Address PR comment

This commit is contained in:
Nathan Shively-Sanders 2017-02-14 14:13:12 -08:00
parent 2f27e85a18
commit d1a972fcdd
5 changed files with 20 additions and 20 deletions

View file

@ -317,7 +317,7 @@ namespace ts {
function reportIllegalExtends() {
if (errorNameNode) {
reportedDeclarationError = true;
emitterDiagnostics.add(createDiagnosticForNode(errorNameNode, Diagnostics.Extends_clause_of_exported_class_0_refers_to_a_type_with_no_declaration,
emitterDiagnostics.add(createDiagnosticForNode(errorNameNode, Diagnostics.Extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced,
declarationNameToString(errorNameNode)));
}
}

View file

@ -2352,7 +2352,7 @@
"category": "Error",
"code": 4092
},
"Extends clause of exported class '{0}' refers to a type with no declaration.": {
"Extends clause of exported class '{0}' refers to a type whose name cannot be referenced.": {
"category": "Error",
"code": 4093
},

View file

@ -1,7 +1,7 @@
tests/cases/compiler/declarationEmitExpressionInExtends4.ts(2,10): error TS4060: Return type of exported function has or is using private name 'D'.
tests/cases/compiler/declarationEmitExpressionInExtends4.ts(6,7): error TS4093: Extends clause of exported class 'C' refers to a type with no declaration.
tests/cases/compiler/declarationEmitExpressionInExtends4.ts(6,7): error TS4093: Extends clause of exported class 'C' refers to a type whose name cannot be referenced.
tests/cases/compiler/declarationEmitExpressionInExtends4.ts(6,17): error TS2315: Type 'D' is not generic.
tests/cases/compiler/declarationEmitExpressionInExtends4.ts(10,7): error TS4093: Extends clause of exported class 'C2' refers to a type with no declaration.
tests/cases/compiler/declarationEmitExpressionInExtends4.ts(10,7): error TS4093: Extends clause of exported class 'C2' refers to a type whose name cannot be referenced.
tests/cases/compiler/declarationEmitExpressionInExtends4.ts(10,18): error TS2304: Cannot find name 'SomeUndefinedFunction'.
tests/cases/compiler/declarationEmitExpressionInExtends4.ts(15,18): error TS2304: Cannot find name 'SomeUndefinedFunction'.
tests/cases/compiler/declarationEmitExpressionInExtends4.ts(15,18): error TS4020: Extends clause of exported class 'C3' has or is using private name 'SomeUndefinedFunction'.
@ -17,7 +17,7 @@ tests/cases/compiler/declarationEmitExpressionInExtends4.ts(15,18): error TS4020
class C extends getSomething()<number, string> {
~
!!! error TS4093: Extends clause of exported class 'C' refers to a type with no declaration.
!!! error TS4093: Extends clause of exported class 'C' refers to a type whose name cannot be referenced.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2315: Type 'D' is not generic.
@ -25,7 +25,7 @@ tests/cases/compiler/declarationEmitExpressionInExtends4.ts(15,18): error TS4020
class C2 extends SomeUndefinedFunction()<number, string> {
~~
!!! error TS4093: Extends clause of exported class 'C2' refers to a type with no declaration.
!!! error TS4093: Extends clause of exported class 'C2' refers to a type whose name cannot be referenced.
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'SomeUndefinedFunction'.

View file

@ -1,4 +1,4 @@
tests/cases/compiler/FinalClass.ts(4,14): error TS4093: Extends clause of exported class 'MyExtendedClass' refers to a type with no declaration.
tests/cases/compiler/FinalClass.ts(4,14): error TS4093: Extends clause of exported class 'MyExtendedClass' refers to a type whose name cannot be referenced.
==== tests/cases/compiler/BaseClass.ts (0 errors) ====
@ -26,7 +26,7 @@ tests/cases/compiler/FinalClass.ts(4,14): error TS4093: Extends clause of export
export class MyExtendedClass extends MyMixin(MyBaseClass)<string> {
~~~~~~~~~~~~~~~
!!! error TS4093: Extends clause of exported class 'MyExtendedClass' refers to a type with no declaration.
!!! error TS4093: Extends clause of exported class 'MyExtendedClass' refers to a type whose name cannot be referenced.
extendedClassProperty: number;
}
==== tests/cases/compiler/Main.ts (0 errors) ====

View file

@ -5,20 +5,20 @@ tests/cases/conformance/classes/mixinAccessModifiers.ts(51,4): error TS2445: Pro
tests/cases/conformance/classes/mixinAccessModifiers.ts(66,7): error TS2415: Class 'C1' incorrectly extends base class 'Private & Private2'.
Type 'C1' is not assignable to type 'Private'.
Property 'p' has conflicting declarations and is inaccessible in type 'C1'.
tests/cases/conformance/classes/mixinAccessModifiers.ts(66,7): error TS4093: Extends clause of exported class 'C1' refers to a type with no declaration.
tests/cases/conformance/classes/mixinAccessModifiers.ts(66,7): error TS4093: Extends clause of exported class 'C1' refers to a type whose name cannot be referenced.
tests/cases/conformance/classes/mixinAccessModifiers.ts(67,7): error TS2415: Class 'C2' incorrectly extends base class 'Private & Protected'.
Type 'C2' is not assignable to type 'Private'.
Property 'p' has conflicting declarations and is inaccessible in type 'C2'.
tests/cases/conformance/classes/mixinAccessModifiers.ts(67,7): error TS4093: Extends clause of exported class 'C2' refers to a type with no declaration.
tests/cases/conformance/classes/mixinAccessModifiers.ts(67,7): error TS4093: Extends clause of exported class 'C2' refers to a type whose name cannot be referenced.
tests/cases/conformance/classes/mixinAccessModifiers.ts(68,7): error TS2415: Class 'C3' incorrectly extends base class 'Private & Public'.
Type 'C3' is not assignable to type 'Private'.
Property 'p' has conflicting declarations and is inaccessible in type 'C3'.
tests/cases/conformance/classes/mixinAccessModifiers.ts(68,7): error TS4093: Extends clause of exported class 'C3' refers to a type with no declaration.
tests/cases/conformance/classes/mixinAccessModifiers.ts(70,7): error TS4093: Extends clause of exported class 'C4' refers to a type with no declaration.
tests/cases/conformance/classes/mixinAccessModifiers.ts(83,7): error TS4093: Extends clause of exported class 'C5' refers to a type with no declaration.
tests/cases/conformance/classes/mixinAccessModifiers.ts(68,7): error TS4093: Extends clause of exported class 'C3' refers to a type whose name cannot be referenced.
tests/cases/conformance/classes/mixinAccessModifiers.ts(70,7): error TS4093: Extends clause of exported class 'C4' refers to a type whose name cannot be referenced.
tests/cases/conformance/classes/mixinAccessModifiers.ts(83,7): error TS4093: Extends clause of exported class 'C5' refers to a type whose name cannot be referenced.
tests/cases/conformance/classes/mixinAccessModifiers.ts(85,6): error TS2445: Property 'p' is protected and only accessible within class 'C4' and its subclasses.
tests/cases/conformance/classes/mixinAccessModifiers.ts(90,6): error TS2445: Property 's' is protected and only accessible within class 'typeof C4' and its subclasses.
tests/cases/conformance/classes/mixinAccessModifiers.ts(96,7): error TS4093: Extends clause of exported class 'C6' refers to a type with no declaration.
tests/cases/conformance/classes/mixinAccessModifiers.ts(96,7): error TS4093: Extends clause of exported class 'C6' refers to a type whose name cannot be referenced.
tests/cases/conformance/classes/mixinAccessModifiers.ts(98,6): error TS2445: Property 'p' is protected and only accessible within class 'C4' and its subclasses.
tests/cases/conformance/classes/mixinAccessModifiers.ts(103,6): error TS2445: Property 's' is protected and only accessible within class 'typeof C4' and its subclasses.
@ -103,25 +103,25 @@ tests/cases/conformance/classes/mixinAccessModifiers.ts(103,6): error TS2445: Pr
!!! error TS2415: Type 'C1' is not assignable to type 'Private'.
!!! error TS2415: Property 'p' has conflicting declarations and is inaccessible in type 'C1'.
~~
!!! error TS4093: Extends clause of exported class 'C1' refers to a type with no declaration.
!!! error TS4093: Extends clause of exported class 'C1' refers to a type whose name cannot be referenced.
class C2 extends Mix(Private, Protected) {}
~~
!!! error TS2415: Class 'C2' incorrectly extends base class 'Private & Protected'.
!!! error TS2415: Type 'C2' is not assignable to type 'Private'.
!!! error TS2415: Property 'p' has conflicting declarations and is inaccessible in type 'C2'.
~~
!!! error TS4093: Extends clause of exported class 'C2' refers to a type with no declaration.
!!! error TS4093: Extends clause of exported class 'C2' refers to a type whose name cannot be referenced.
class C3 extends Mix(Private, Public) {}
~~
!!! error TS2415: Class 'C3' incorrectly extends base class 'Private & Public'.
!!! error TS2415: Type 'C3' is not assignable to type 'Private'.
!!! error TS2415: Property 'p' has conflicting declarations and is inaccessible in type 'C3'.
~~
!!! error TS4093: Extends clause of exported class 'C3' refers to a type with no declaration.
!!! error TS4093: Extends clause of exported class 'C3' refers to a type whose name cannot be referenced.
class C4 extends Mix(Protected, Protected2) {
~~
!!! error TS4093: Extends clause of exported class 'C4' refers to a type with no declaration.
!!! error TS4093: Extends clause of exported class 'C4' refers to a type whose name cannot be referenced.
f(c4: C4, c5: C5, c6: C6) {
c4.p;
c5.p;
@ -136,7 +136,7 @@ tests/cases/conformance/classes/mixinAccessModifiers.ts(103,6): error TS2445: Pr
class C5 extends Mix(Protected, Public) {
~~
!!! error TS4093: Extends clause of exported class 'C5' refers to a type with no declaration.
!!! error TS4093: Extends clause of exported class 'C5' refers to a type whose name cannot be referenced.
f(c4: C4, c5: C5, c6: C6) {
c4.p; // Error, not in class deriving from Protected2
~
@ -155,7 +155,7 @@ tests/cases/conformance/classes/mixinAccessModifiers.ts(103,6): error TS2445: Pr
class C6 extends Mix(Public, Public2) {
~~
!!! error TS4093: Extends clause of exported class 'C6' refers to a type with no declaration.
!!! error TS4093: Extends clause of exported class 'C6' refers to a type whose name cannot be referenced.
f(c4: C4, c5: C5, c6: C6) {
c4.p; // Error, not in class deriving from Protected2
~