mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
Accepting new baselines
This commit is contained in:
parent
80ea68701b
commit
956d73ef5e
@ -1,40 +0,0 @@
|
||||
tests/cases/compiler/checkForObjectTooStrict.ts(22,19): error TS2311: A class may only extend another class.
|
||||
tests/cases/compiler/checkForObjectTooStrict.ts(26,9): error TS2335: 'super' can only be referenced in a derived class.
|
||||
|
||||
|
||||
==== tests/cases/compiler/checkForObjectTooStrict.ts (2 errors) ====
|
||||
module Foo {
|
||||
|
||||
export class Object {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Bar extends Foo.Object { // should work
|
||||
|
||||
constructor () {
|
||||
|
||||
super();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class Baz extends Object {
|
||||
~~~~~~
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
|
||||
constructor () { // ERROR, as expected
|
||||
|
||||
super();
|
||||
~~~~~
|
||||
!!! error TS2335: 'super' can only be referenced in a derived class.
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
42
tests/baselines/reference/checkForObjectTooStrict.symbols
Normal file
42
tests/baselines/reference/checkForObjectTooStrict.symbols
Normal file
@ -0,0 +1,42 @@
|
||||
=== tests/cases/compiler/checkForObjectTooStrict.ts ===
|
||||
module Foo {
|
||||
>Foo : Symbol(Foo, Decl(checkForObjectTooStrict.ts, 0, 0))
|
||||
|
||||
export class Object {
|
||||
>Object : Symbol(Object, Decl(checkForObjectTooStrict.ts, 0, 12))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Bar extends Foo.Object { // should work
|
||||
>Bar : Symbol(Bar, Decl(checkForObjectTooStrict.ts, 6, 1))
|
||||
>Foo.Object : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 12))
|
||||
>Foo : Symbol(Foo, Decl(checkForObjectTooStrict.ts, 0, 0))
|
||||
>Object : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 12))
|
||||
|
||||
constructor () {
|
||||
|
||||
super();
|
||||
>super : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 12))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class Baz extends Object {
|
||||
>Baz : Symbol(Baz, Decl(checkForObjectTooStrict.ts, 18, 1))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11))
|
||||
|
||||
constructor () { // ERROR, as expected
|
||||
|
||||
super();
|
||||
>super : Symbol(ObjectConstructor, Decl(lib.d.ts, 124, 1))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
44
tests/baselines/reference/checkForObjectTooStrict.types
Normal file
44
tests/baselines/reference/checkForObjectTooStrict.types
Normal file
@ -0,0 +1,44 @@
|
||||
=== tests/cases/compiler/checkForObjectTooStrict.ts ===
|
||||
module Foo {
|
||||
>Foo : typeof Foo
|
||||
|
||||
export class Object {
|
||||
>Object : Object
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Bar extends Foo.Object { // should work
|
||||
>Bar : Bar
|
||||
>Foo.Object : any
|
||||
>Foo : typeof Foo
|
||||
>Object : Foo.Object
|
||||
|
||||
constructor () {
|
||||
|
||||
super();
|
||||
>super() : void
|
||||
>super : typeof Foo.Object
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class Baz extends Object {
|
||||
>Baz : Baz
|
||||
>Object : Object
|
||||
|
||||
constructor () { // ERROR, as expected
|
||||
|
||||
super();
|
||||
>super() : void
|
||||
>super : ObjectConstructor
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,13 +4,12 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(6,18): error TS2304: Cannot find name 'Void'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(7,19): error TS1109: Expression expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(8,18): error TS2304: Cannot find name 'Null'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(9,19): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(10,18): error TS2304: Cannot find name 'undefined'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(10,18): error TS2507: Base expression is not of a constructor function type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(11,18): error TS2304: Cannot find name 'Undefined'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(14,18): error TS2311: A class may only extend another class.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(14,18): error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts (10 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts (9 errors) ====
|
||||
// classes cannot extend primitives
|
||||
|
||||
class C extends number { }
|
||||
@ -32,11 +31,9 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'Null'.
|
||||
class C5a extends null { }
|
||||
~~~~
|
||||
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
class C6 extends undefined { }
|
||||
~~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'undefined'.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
class C7 extends Undefined { }
|
||||
~~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'Undefined'.
|
||||
@ -44,4 +41,4 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
enum E { A }
|
||||
class C8 extends E { }
|
||||
~
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
@ -1,13 +1,10 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts(3,19): error TS1109: Expression expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts(4,19): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts (2 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts (1 errors) ====
|
||||
// classes cannot extend primitives
|
||||
|
||||
class C4a extends void {}
|
||||
~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
class C5a extends null { }
|
||||
~~~~
|
||||
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
class C5a extends null { }
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/classExtendingQualifiedName.ts(5,23): error TS2305: Module 'M' has no exported member 'C'.
|
||||
tests/cases/compiler/classExtendingQualifiedName.ts(5,23): error TS2339: Property 'C' does not exist on type 'typeof M'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classExtendingQualifiedName.ts (1 errors) ====
|
||||
@ -8,6 +8,6 @@ tests/cases/compiler/classExtendingQualifiedName.ts(5,23): error TS2305: Module
|
||||
|
||||
class D extends M.C {
|
||||
~
|
||||
!!! error TS2305: Module 'M' has no exported member 'C'.
|
||||
!!! error TS2339: Property 'C' does not exist on type 'typeof M'.
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts(10,21): error TS2419: Type name 'A' in extends clause does not reference constructor function for 'A'.
|
||||
tests/cases/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts(10,21): error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts (1 errors) ====
|
||||
@ -13,7 +13,7 @@ tests/cases/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstruct
|
||||
var A = 1;
|
||||
class B extends A {
|
||||
~
|
||||
!!! error TS2419: Type name 'A' in extends clause does not reference constructor function for 'A'.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
b: string;
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/classExtendsClauseClassNotReferringConstructor.ts(4,21): error TS2419: Type name 'A' in extends clause does not reference constructor function for 'A'.
|
||||
tests/cases/compiler/classExtendsClauseClassNotReferringConstructor.ts(4,21): error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classExtendsClauseClassNotReferringConstructor.ts (1 errors) ====
|
||||
@ -7,6 +7,6 @@ tests/cases/compiler/classExtendsClauseClassNotReferringConstructor.ts(4,21): er
|
||||
var A = 1;
|
||||
class B extends A { b: string; }
|
||||
~
|
||||
!!! error TS2419: Type name 'A' in extends clause does not reference constructor function for 'A'.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
}
|
||||
|
||||
@ -1,40 +1,43 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(4,17): error TS2311: A class may only extend another class.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,18): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(4,17): error TS2304: Cannot find name 'I'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,18): error TS2507: Base expression is not of a constructor function type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,25): error TS2304: Cannot find name 'string'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,31): error TS1005: ',' expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(8,18): error TS2304: Cannot find name 'x'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(11,18): error TS2304: Cannot find name 'M'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(14,18): error TS2304: Cannot find name 'foo'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(16,18): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(8,18): error TS2507: Base expression is not of a constructor function type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(11,18): error TS2507: Base expression is not of a constructor function type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(14,18): error TS2507: Base expression is not of a constructor function type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(16,18): error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts (7 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts (8 errors) ====
|
||||
interface I {
|
||||
foo: string;
|
||||
}
|
||||
class C extends I { } // error
|
||||
~
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
!!! error TS2304: Cannot find name 'I'.
|
||||
|
||||
class C2 extends { foo: string; } { } // error
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'string'.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
var x: { foo: string; }
|
||||
class C3 extends x { } // error
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'x'.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
module M { export var x = 1; }
|
||||
class C4 extends M { } // error
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'M'.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
function foo() { }
|
||||
class C5 extends foo { } // error
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'foo'.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
class C6 extends []{ } // error
|
||||
~~
|
||||
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
@ -1,15 +1,18 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,18): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,18): error TS2507: Base expression is not of a constructor function type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,25): error TS2304: Cannot find name 'string'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,31): error TS1005: ',' expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(3,18): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(3,18): error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts (3 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts (4 errors) ====
|
||||
class C2 extends { foo: string; } { } // error
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'string'.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
|
||||
class C6 extends []{ } // error
|
||||
~~
|
||||
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
@ -1,17 +1,17 @@
|
||||
tests/cases/compiler/classExtendsInterface.ts(2,17): error TS2311: A class may only extend another class.
|
||||
tests/cases/compiler/classExtendsInterface.ts(6,21): error TS2311: A class may only extend another class.
|
||||
tests/cases/compiler/classExtendsInterface.ts(2,17): error TS2304: Cannot find name 'Comparable'.
|
||||
tests/cases/compiler/classExtendsInterface.ts(6,21): error TS2304: Cannot find name 'Comparable2'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classExtendsInterface.ts (2 errors) ====
|
||||
interface Comparable {}
|
||||
class A extends Comparable {}
|
||||
~~~~~~~~~~
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
!!! error TS2304: Cannot find name 'Comparable'.
|
||||
class B implements Comparable {}
|
||||
|
||||
interface Comparable2<T> {}
|
||||
class A2<T> extends Comparable2<T> {}
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'Comparable2'.
|
||||
class B2<T> implements Comparable2<T> {}
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts(1,7): error TS2310: Type 'C' recursively references itself as a base type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts(3,7): error TS2310: Type 'D<T>' recursively references itself as a base type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts(5,7): error TS2310: Type 'E<T>' recursively references itself as a base type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts(1,7): error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts(3,7): error TS2506: 'D' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts(5,7): error TS2506: 'E' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts (3 errors) ====
|
||||
class C extends C { } // error
|
||||
~
|
||||
!!! error TS2310: Type 'C' recursively references itself as a base type.
|
||||
!!! error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
class D<T> extends D<T> { } // error
|
||||
~
|
||||
!!! error TS2310: Type 'D<T>' recursively references itself as a base type.
|
||||
!!! error TS2506: 'D' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
class E<T> extends E<string> { } // error
|
||||
~
|
||||
!!! error TS2310: Type 'E<T>' recursively references itself as a base type.
|
||||
!!! error TS2506: 'E' is referenced directly or indirectly in its own base expression.
|
||||
@ -1,20 +1,32 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts(1,7): error TS2310: Type 'C' recursively references itself as a base type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts(7,7): error TS2310: Type 'C2<T>' recursively references itself as a base type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts(1,7): error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts(3,7): error TS2506: 'D' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts(5,7): error TS2506: 'E' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts(7,7): error TS2506: 'C2' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts(9,7): error TS2506: 'D2' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts(11,7): error TS2506: 'E2' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts (2 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts (6 errors) ====
|
||||
class C extends E { foo: string; } // error
|
||||
~
|
||||
!!! error TS2310: Type 'C' recursively references itself as a base type.
|
||||
!!! error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
class D extends C { bar: string; }
|
||||
~
|
||||
!!! error TS2506: 'D' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
class E extends D { baz: number; }
|
||||
~
|
||||
!!! error TS2506: 'E' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
class C2<T> extends E2<T> { foo: T; } // error
|
||||
~~
|
||||
!!! error TS2310: Type 'C2<T>' recursively references itself as a base type.
|
||||
!!! error TS2506: 'C2' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
class D2<T> extends C2<T> { bar: T; }
|
||||
~~
|
||||
!!! error TS2506: 'D2' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
class E2<T> extends D2<T> { baz: T; }
|
||||
class E2<T> extends D2<T> { baz: T; }
|
||||
~~
|
||||
!!! error TS2506: 'E2' is referenced directly or indirectly in its own base expression.
|
||||
@ -1,31 +1,43 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts(1,7): error TS2310: Type 'C' recursively references itself as a base type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts(13,11): error TS2310: Type 'C2<T>' recursively references itself as a base type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts(1,7): error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts(4,18): error TS2506: 'D' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts(9,18): error TS2506: 'E' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts(13,11): error TS2506: 'C2' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts(16,22): error TS2506: 'D2' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts(20,22): error TS2506: 'E2' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts (2 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts (6 errors) ====
|
||||
class C extends N.E { foo: string; } // error
|
||||
~
|
||||
!!! error TS2310: Type 'C' recursively references itself as a base type.
|
||||
!!! error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
module M {
|
||||
export class D extends C { bar: string; }
|
||||
~
|
||||
!!! error TS2506: 'D' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
}
|
||||
|
||||
module N {
|
||||
export class E extends M.D { baz: number; }
|
||||
~
|
||||
!!! error TS2506: 'E' is referenced directly or indirectly in its own base expression.
|
||||
}
|
||||
|
||||
module O {
|
||||
class C2<T> extends Q.E2<T> { foo: T; } // error
|
||||
~~
|
||||
!!! error TS2310: Type 'C2<T>' recursively references itself as a base type.
|
||||
!!! error TS2506: 'C2' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
module P {
|
||||
export class D2<T> extends C2<T> { bar: T; }
|
||||
~~
|
||||
!!! error TS2506: 'D2' is referenced directly or indirectly in its own base expression.
|
||||
}
|
||||
|
||||
module Q {
|
||||
export class E2<T> extends P.D2<T> { baz: T; }
|
||||
~~
|
||||
!!! error TS2506: 'E2' is referenced directly or indirectly in its own base expression.
|
||||
}
|
||||
}
|
||||
@ -1,25 +1,37 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file1.ts(1,7): error TS2310: Type 'C' recursively references itself as a base type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file4.ts(1,7): error TS2310: Type 'C2<T>' recursively references itself as a base type.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file1.ts(1,7): error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file2.ts(1,7): error TS2506: 'D' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file3.ts(1,7): error TS2506: 'E' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file4.ts(1,7): error TS2506: 'C2' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file5.ts(1,7): error TS2506: 'D2' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file6.ts(1,7): error TS2506: 'E2' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file1.ts (1 errors) ====
|
||||
class C extends E { foo: string; } // error
|
||||
~
|
||||
!!! error TS2310: Type 'C' recursively references itself as a base type.
|
||||
!!! error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file2.ts (0 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file2.ts (1 errors) ====
|
||||
class D extends C { bar: string; }
|
||||
~
|
||||
!!! error TS2506: 'D' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file3.ts (0 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file3.ts (1 errors) ====
|
||||
class E extends D { baz: number; }
|
||||
~
|
||||
!!! error TS2506: 'E' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file4.ts (1 errors) ====
|
||||
class C2<T> extends E2<T> { foo: T; } // error
|
||||
~~
|
||||
!!! error TS2310: Type 'C2<T>' recursively references itself as a base type.
|
||||
!!! error TS2506: 'C2' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file5.ts (0 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file5.ts (1 errors) ====
|
||||
class D2<T> extends C2<T> { bar: T; }
|
||||
~~
|
||||
!!! error TS2506: 'D2' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file6.ts (0 errors) ====
|
||||
class E2<T> extends D2<T> { baz: T; }
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file6.ts (1 errors) ====
|
||||
class E2<T> extends D2<T> { baz: T; }
|
||||
~~
|
||||
!!! error TS2506: 'E2' is referenced directly or indirectly in its own base expression.
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsShadowedConstructorFunction.ts(5,21): error TS2419: Type name 'C' in extends clause does not reference constructor function for 'C'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsShadowedConstructorFunction.ts(5,21): error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsShadowedConstructorFunction.ts (1 errors) ====
|
||||
@ -8,7 +8,7 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
var C = 1;
|
||||
class D extends C { // error, C must evaluate to constructor function
|
||||
~
|
||||
!!! error TS2419: Type name 'C' in extends clause does not reference constructor function for 'C'.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
bar: string;
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsValidConstructorFunction.ts(5,17): error TS2304: Cannot find name 'foo'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsValidConstructorFunction.ts(5,17): error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsValidConstructorFunction.ts (1 errors) ====
|
||||
@ -8,4 +8,4 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
|
||||
class C extends foo { } // error, cannot extend it though
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'foo'.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
@ -1,8 +1,8 @@
|
||||
tests/cases/compiler/classInheritence.ts(2,7): error TS2310: Type 'A' recursively references itself as a base type.
|
||||
tests/cases/compiler/classInheritence.ts(2,7): error TS2506: 'A' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classInheritence.ts (1 errors) ====
|
||||
class B extends A { }
|
||||
class A extends A { }
|
||||
~
|
||||
!!! error TS2310: Type 'A' recursively references itself as a base type.
|
||||
!!! error TS2506: 'A' is referenced directly or indirectly in its own base expression.
|
||||
@ -1,7 +1,5 @@
|
||||
tests/cases/compiler/classUpdateTests.ts(34,2): error TS2377: Constructors for derived classes must contain a 'super' call.
|
||||
tests/cases/compiler/classUpdateTests.ts(43,18): error TS2335: 'super' can only be referenced in a derived class.
|
||||
tests/cases/compiler/classUpdateTests.ts(46,17): error TS2311: A class may only extend another class.
|
||||
tests/cases/compiler/classUpdateTests.ts(47,18): error TS2335: 'super' can only be referenced in a derived class.
|
||||
tests/cases/compiler/classUpdateTests.ts(57,2): error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.
|
||||
tests/cases/compiler/classUpdateTests.ts(63,7): error TS2415: Class 'L' incorrectly extends base class 'G'.
|
||||
Property 'p1' is private in type 'L' but not in type 'G'.
|
||||
@ -20,7 +18,7 @@ tests/cases/compiler/classUpdateTests.ts(111,15): error TS1005: ';' expected.
|
||||
tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or statement expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classUpdateTests.ts (18 errors) ====
|
||||
==== tests/cases/compiler/classUpdateTests.ts (16 errors) ====
|
||||
//
|
||||
// test codegen for instance properties
|
||||
//
|
||||
@ -71,11 +69,7 @@ tests/cases/compiler/classUpdateTests.ts(113,1): error TS1128: Declaration or st
|
||||
}
|
||||
|
||||
class I extends Object {
|
||||
~~~~~~
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
constructor() { super(); } // ERROR - no super call allowed
|
||||
~~~~~
|
||||
!!! error TS2335: 'super' can only be referenced in a derived class.
|
||||
}
|
||||
|
||||
class J extends G {
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts(1,7): error TS2310: Type 'S18<B, A, C>' recursively references itself as a base type.
|
||||
tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts(1,7): error TS2506: 'S18' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts(4,2): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
|
||||
|
||||
==== tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts (2 errors) ====
|
||||
class S18<B, A, C> extends S18<A[], { S19: A; (): A }[], C[]>
|
||||
~~~
|
||||
!!! error TS2310: Type 'S18<B, A, C>' recursively references itself as a base type.
|
||||
!!! error TS2506: 'S18' is referenced directly or indirectly in its own base expression.
|
||||
{
|
||||
}
|
||||
(new S18(123)).S18 = 0;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/constraints0.ts(14,9): error TS2344: Type 'B' does not satisfy the constraint 'A'.
|
||||
tests/cases/compiler/constraints0.ts(14,11): error TS2344: Type 'B' does not satisfy the constraint 'A'.
|
||||
Property 'a' is missing in type 'B'.
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ tests/cases/compiler/constraints0.ts(14,9): error TS2344: Type 'B' does not sati
|
||||
|
||||
var v1: C<A>; // should work
|
||||
var v2: C<B>; // should not work
|
||||
~~~~
|
||||
~
|
||||
!!! error TS2344: Type 'B' does not satisfy the constraint 'A'.
|
||||
!!! error TS2344: Property 'a' is missing in type 'B'.
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/extBaseClass2.ts(2,31): error TS2305: Module 'M' has no exported member 'B'.
|
||||
tests/cases/compiler/extBaseClass2.ts(2,31): error TS2339: Property 'B' does not exist on type 'typeof M'.
|
||||
tests/cases/compiler/extBaseClass2.ts(7,29): error TS2304: Cannot find name 'B'.
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ tests/cases/compiler/extBaseClass2.ts(7,29): error TS2304: Cannot find name 'B'.
|
||||
module N {
|
||||
export class C4 extends M.B {
|
||||
~
|
||||
!!! error TS2305: Module 'M' has no exported member 'B'.
|
||||
!!! error TS2339: Property 'B' does not exist on type 'typeof M'.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
tests/cases/compiler/extendNonClassSymbol1.ts(3,17): error TS2304: Cannot find name 'x'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/extendNonClassSymbol1.ts (1 errors) ====
|
||||
class A { foo() { } }
|
||||
var x = A;
|
||||
class C extends x { } // error, could not find symbol xs
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'x'.
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/extendNonClassSymbol2.ts(5,17): error TS2304: Cannot find name 'Foo'.
|
||||
tests/cases/compiler/extendNonClassSymbol2.ts(5,17): error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/extendNonClassSymbol2.ts (1 errors) ====
|
||||
@ -8,4 +8,4 @@ tests/cases/compiler/extendNonClassSymbol2.ts(5,17): error TS2304: Cannot find n
|
||||
var x = new Foo(); // legal, considered a constructor function
|
||||
class C extends Foo {} // error, could not find symbol Foo
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'Foo'.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
@ -1,9 +1,12 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts(2,21): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts(2,21): error TS2507: Base expression is not of a constructor function type.
|
||||
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts(2,22): error TS1163: A 'yield' expression is only allowed in a generator body.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts (1 errors) ====
|
||||
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck40.ts (2 errors) ====
|
||||
function* g() {
|
||||
class C extends (yield 0) { }
|
||||
~~~~~~~~~
|
||||
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
~~~~~
|
||||
!!! error TS1163: A 'yield' expression is only allowed in a generator body.
|
||||
}
|
||||
@ -1,9 +1,12 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts(2,21): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts(2,21): error TS2507: Base expression is not of a constructor function type.
|
||||
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts(2,22): error TS1163: A 'yield' expression is only allowed in a generator body.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts (1 errors) ====
|
||||
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck60.ts (2 errors) ====
|
||||
function* g() {
|
||||
class C extends (yield) {};
|
||||
~~~~~~~
|
||||
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
~~~~~
|
||||
!!! error TS1163: A 'yield' expression is only allowed in a generator body.
|
||||
}
|
||||
@ -8,7 +8,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(14,23): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(14,27): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(16,25): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(22,28): error TS2305: Module 'M' has no exported member 'C'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(22,28): error TS2339: Property 'C' does not exist on type 'typeof M'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(23,28): error TS2314: Generic type 'E<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(25,30): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(26,30): error TS2314: Generic type 'E<T>' requires 1 type argument(s).
|
||||
@ -58,7 +58,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
|
||||
|
||||
declare class D2 extends M.C { }
|
||||
~
|
||||
!!! error TS2305: Module 'M' has no exported member 'C'.
|
||||
!!! error TS2339: Property 'C' does not exist on type 'typeof M'.
|
||||
declare class D3<T extends M.E> { }
|
||||
~~~
|
||||
!!! error TS2314: Generic type 'E<T>' requires 1 type argument(s).
|
||||
|
||||
@ -13,9 +13,9 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(18,23): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(18,27): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(18,38): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS2304: Cannot find name 'I'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(23,21): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(29,20): error TS2305: Module 'M' has no exported member 'C'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2304: Cannot find name 'M'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2305: Module 'M' has no exported member 'C'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
|
||||
@ -76,7 +76,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
|
||||
|
||||
class D extends I {
|
||||
~
|
||||
!!! error TS2314: Generic type 'I<T>' requires 1 type argument(s).
|
||||
!!! error TS2304: Cannot find name 'I'.
|
||||
}
|
||||
|
||||
interface U extends I {}
|
||||
@ -88,8 +88,8 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
|
||||
}
|
||||
|
||||
class D2 extends M.C { }
|
||||
~
|
||||
!!! error TS2305: Module 'M' has no exported member 'C'.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'M'.
|
||||
interface D3<T extends M.E> { }
|
||||
~~~
|
||||
!!! error TS2314: Generic type 'E<T>' requires 1 type argument(s).
|
||||
|
||||
@ -8,7 +8,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(14,23): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(14,27): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(16,25): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(22,28): error TS2305: Module 'M' has no exported member 'C'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(22,28): error TS2339: Property 'C' does not exist on type 'typeof M'.
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(23,28): error TS2314: Generic type 'E<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(25,30): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
|
||||
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(26,30): error TS2314: Generic type 'E<T>' requires 1 type argument(s).
|
||||
@ -58,7 +58,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
|
||||
|
||||
declare class D2 extends M.C { }
|
||||
~
|
||||
!!! error TS2305: Module 'M' has no exported member 'C'.
|
||||
!!! error TS2339: Property 'C' does not exist on type 'typeof M'.
|
||||
declare class D3<T extends M.E> { }
|
||||
~~~
|
||||
!!! error TS2314: Generic type 'E<T>' requires 1 type argument(s).
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/generics1.ts(10,9): error TS2344: Type 'A' does not satisfy the constraint 'B'.
|
||||
tests/cases/compiler/generics1.ts(10,14): error TS2344: Type 'A' does not satisfy the constraint 'B'.
|
||||
Property 'b' is missing in type 'A'.
|
||||
tests/cases/compiler/generics1.ts(13,9): error TS2314: Generic type 'G<T, U>' requires 2 type argument(s).
|
||||
tests/cases/compiler/generics1.ts(14,9): error TS2314: Generic type 'G<T, U>' requires 2 type argument(s).
|
||||
@ -15,7 +15,7 @@ tests/cases/compiler/generics1.ts(14,9): error TS2314: Generic type 'G<T, U>' re
|
||||
var v1: G<A, C>; // Ok
|
||||
var v2: G<{ a: string }, C>; // Ok, equivalent to G<A, C>
|
||||
var v3: G<A, A>; // Error, A not valid argument for U
|
||||
~~~~~~~
|
||||
~
|
||||
!!! error TS2344: Type 'A' does not satisfy the constraint 'B'.
|
||||
!!! error TS2344: Property 'b' is missing in type 'A'.
|
||||
var v4: G<G<A, B>, C>; // Ok
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/generics2.ts(17,9): error TS2344: Type 'A' does not satisfy the constraint 'B'.
|
||||
tests/cases/compiler/generics2.ts(17,14): error TS2344: Type 'A' does not satisfy the constraint 'B'.
|
||||
Property 'b' is missing in type 'A'.
|
||||
tests/cases/compiler/generics2.ts(20,9): error TS2314: Generic type 'G<T, U>' requires 2 type argument(s).
|
||||
tests/cases/compiler/generics2.ts(21,9): error TS2314: Generic type 'G<T, U>' requires 2 type argument(s).
|
||||
@ -22,7 +22,7 @@ tests/cases/compiler/generics2.ts(21,9): error TS2314: Generic type 'G<T, U>' re
|
||||
|
||||
var v2: G<{ a: string }, C>; // Ok, equivalent to G<A, C>
|
||||
var v3: G<A, A>; // Error, A not valid argument for U
|
||||
~~~~~~~
|
||||
~
|
||||
!!! error TS2344: Type 'A' does not satisfy the constraint 'B'.
|
||||
!!! error TS2344: Property 'b' is missing in type 'A'.
|
||||
var v4: G<G<A, B>, C>; // Ok
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/generics5.ts(10,9): error TS2344: Type 'A' does not satisfy the constraint 'B'.
|
||||
tests/cases/compiler/generics5.ts(10,14): error TS2344: Type 'A' does not satisfy the constraint 'B'.
|
||||
Property 'b' is missing in type 'A'.
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ tests/cases/compiler/generics5.ts(10,9): error TS2344: Type 'A' does not satisfy
|
||||
}
|
||||
|
||||
var v3: G<A, A>; // Error, A not valid argument for U
|
||||
~~~~~~~
|
||||
~
|
||||
!!! error TS2344: Type 'A' does not satisfy the constraint 'B'.
|
||||
!!! error TS2344: Property 'b' is missing in type 'A'.
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/importAsBaseClass_1.ts(2,21): error TS2304: Cannot find name 'Greeter'.
|
||||
tests/cases/compiler/importAsBaseClass_1.ts(2,21): error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/importAsBaseClass_1.ts (1 errors) ====
|
||||
import Greeter = require("importAsBaseClass_0");
|
||||
class Hello extends Greeter { }
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'Greeter'.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
==== tests/cases/compiler/importAsBaseClass_0.ts (0 errors) ====
|
||||
export class Greeter {
|
||||
|
||||
@ -25,6 +25,7 @@ var __extends = (this && this.__extends) || function (d, b) {
|
||||
__.prototype = b.prototype;
|
||||
d.prototype = new __();
|
||||
};
|
||||
var Greeter = require("importAsBaseClass_0");
|
||||
var Hello = (function (_super) {
|
||||
__extends(Hello, _super);
|
||||
function Hello() {
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
tests/cases/compiler/indirectSelfReference.ts(1,7): error TS2310: Type 'a' recursively references itself as a base type.
|
||||
tests/cases/compiler/indirectSelfReference.ts(1,7): error TS2506: 'a' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/indirectSelfReference.ts(2,7): error TS2506: 'b' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
|
||||
==== tests/cases/compiler/indirectSelfReference.ts (1 errors) ====
|
||||
==== tests/cases/compiler/indirectSelfReference.ts (2 errors) ====
|
||||
class a extends b{ }
|
||||
~
|
||||
!!! error TS2310: Type 'a' recursively references itself as a base type.
|
||||
class b extends a{ }
|
||||
!!! error TS2506: 'a' is referenced directly or indirectly in its own base expression.
|
||||
class b extends a{ }
|
||||
~
|
||||
!!! error TS2506: 'b' is referenced directly or indirectly in its own base expression.
|
||||
@ -1,8 +1,11 @@
|
||||
tests/cases/compiler/indirectSelfReferenceGeneric.ts(1,7): error TS2310: Type 'a<T>' recursively references itself as a base type.
|
||||
tests/cases/compiler/indirectSelfReferenceGeneric.ts(1,7): error TS2506: 'a' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/indirectSelfReferenceGeneric.ts(2,7): error TS2506: 'b' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
|
||||
==== tests/cases/compiler/indirectSelfReferenceGeneric.ts (1 errors) ====
|
||||
==== tests/cases/compiler/indirectSelfReferenceGeneric.ts (2 errors) ====
|
||||
class a<T> extends b<T> { }
|
||||
~
|
||||
!!! error TS2310: Type 'a<T>' recursively references itself as a base type.
|
||||
class b<T> extends a<T> { }
|
||||
!!! error TS2506: 'a' is referenced directly or indirectly in its own base expression.
|
||||
class b<T> extends a<T> { }
|
||||
~
|
||||
!!! error TS2506: 'b' is referenced directly or indirectly in its own base expression.
|
||||
@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/inheritFromGenericTypeParameter.ts(1,20): error TS2311: A class may only extend another class.
|
||||
tests/cases/compiler/inheritFromGenericTypeParameter.ts(1,20): error TS2304: Cannot find name 'T'.
|
||||
tests/cases/compiler/inheritFromGenericTypeParameter.ts(2,24): error TS2312: An interface may only extend a class or another interface.
|
||||
|
||||
|
||||
==== tests/cases/compiler/inheritFromGenericTypeParameter.ts (2 errors) ====
|
||||
class C<T> extends T { }
|
||||
~
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
!!! error TS2304: Cannot find name 'T'.
|
||||
interface I<T> extends T { }
|
||||
~
|
||||
!!! error TS2312: An interface may only extend a class or another interface.
|
||||
@ -7,7 +7,7 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(18,27):
|
||||
Types of parameters 'x' and 'x' are incompatible.
|
||||
Type 'D' is not assignable to type 'B'.
|
||||
Property 'x' is missing in type 'D'.
|
||||
tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,12): error TS2344: Type 'D' does not satisfy the constraint 'A'.
|
||||
tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,14): error TS2344: Type 'D' does not satisfy the constraint 'A'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts (6 errors) ====
|
||||
@ -41,7 +41,7 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,12):
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
var y: G<typeof x>; // error that D does not satisfy constraint, y is of type G<D>, entire call to foo is an error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~
|
||||
~~~~~~~~
|
||||
!!! error TS2344: Type 'D' does not satisfy the constraint 'A'.
|
||||
return y;
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.ts(5,26): error TS2305: Module 'Alpha' has no exported member 'x'.
|
||||
tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.ts(5,20): error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.ts (1 errors) ====
|
||||
@ -7,6 +7,6 @@ tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-
|
||||
}
|
||||
|
||||
class Beta extends Alpha.x {
|
||||
~
|
||||
!!! error TS2305: Module 'Alpha' has no exported member 'x'.
|
||||
~~~~~~~
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
}
|
||||
@ -1,19 +1,31 @@
|
||||
tests/cases/compiler/recursiveBaseCheck.ts(2,11): error TS2310: Type 'C' recursively references itself as a base type.
|
||||
tests/cases/compiler/recursiveBaseCheck.ts(2,11): error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/recursiveBaseCheck.ts(4,18): error TS2506: 'B' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/recursiveBaseCheck.ts(6,18): error TS2506: 'A' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/recursiveBaseCheck.ts(8,18): error TS2506: 'AmChart' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/recursiveBaseCheck.ts(10,18): error TS2506: 'D' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
|
||||
==== tests/cases/compiler/recursiveBaseCheck.ts (1 errors) ====
|
||||
==== tests/cases/compiler/recursiveBaseCheck.ts (5 errors) ====
|
||||
declare module Module {
|
||||
class C extends D {
|
||||
~
|
||||
!!! error TS2310: Type 'C' recursively references itself as a base type.
|
||||
!!! error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
}
|
||||
export class B extends Module.C {
|
||||
~
|
||||
!!! error TS2506: 'B' is referenced directly or indirectly in its own base expression.
|
||||
}
|
||||
export class A extends Module.B {
|
||||
~
|
||||
!!! error TS2506: 'A' is referenced directly or indirectly in its own base expression.
|
||||
}
|
||||
export class AmChart extends Module.A {
|
||||
~~~~~~~
|
||||
!!! error TS2506: 'AmChart' is referenced directly or indirectly in its own base expression.
|
||||
}
|
||||
export class D extends AmChart {
|
||||
~
|
||||
!!! error TS2506: 'D' is referenced directly or indirectly in its own base expression.
|
||||
}
|
||||
export class E extends Module.D {
|
||||
}
|
||||
|
||||
@ -1,13 +1,16 @@
|
||||
tests/cases/compiler/recursiveBaseCheck2.ts(2,18): error TS2310: Type 'b2CircleShape' recursively references itself as a base type.
|
||||
tests/cases/compiler/recursiveBaseCheck2.ts(2,18): error TS2506: 'b2CircleShape' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/recursiveBaseCheck2.ts(4,18): error TS2506: 'b2Shape' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
|
||||
==== tests/cases/compiler/recursiveBaseCheck2.ts (1 errors) ====
|
||||
==== tests/cases/compiler/recursiveBaseCheck2.ts (2 errors) ====
|
||||
declare module Box2D.Collision.Shapes {
|
||||
export class b2CircleShape extends b2Shape {
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2310: Type 'b2CircleShape' recursively references itself as a base type.
|
||||
!!! error TS2506: 'b2CircleShape' is referenced directly or indirectly in its own base expression.
|
||||
}
|
||||
export class b2Shape extends Box2D.Collision.Shapes.b2CircleShape {
|
||||
~~~~~~~
|
||||
!!! error TS2506: 'b2Shape' is referenced directly or indirectly in its own base expression.
|
||||
}
|
||||
}
|
||||
declare module Box2D.Dynamics {
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
tests/cases/compiler/recursiveBaseCheck3.ts(1,7): error TS2310: Type 'A<T>' recursively references itself as a base type.
|
||||
tests/cases/compiler/recursiveBaseCheck3.ts(1,7): error TS2506: 'A' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/recursiveBaseCheck3.ts(2,7): error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/recursiveBaseCheck3.ts(4,9): error TS2339: Property 'blah' does not exist on type 'C<{}>'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/recursiveBaseCheck3.ts (2 errors) ====
|
||||
==== tests/cases/compiler/recursiveBaseCheck3.ts (3 errors) ====
|
||||
class A<T> extends C<T> { }
|
||||
~
|
||||
!!! error TS2310: Type 'A<T>' recursively references itself as a base type.
|
||||
!!! error TS2506: 'A' is referenced directly or indirectly in its own base expression.
|
||||
class C<T> extends A<T> { }
|
||||
~
|
||||
!!! error TS2506: 'C' is referenced directly or indirectly in its own base expression.
|
||||
|
||||
(new C).blah;
|
||||
~~~~
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/recursiveBaseCheck4.ts(1,7): error TS2310: Type 'M<T>' recursively references itself as a base type.
|
||||
tests/cases/compiler/recursiveBaseCheck4.ts(1,7): error TS2506: 'M' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/recursiveBaseCheck4.ts(2,9): error TS2339: Property 'blah' does not exist on type 'M<{}>'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/recursiveBaseCheck4.ts (2 errors) ====
|
||||
class M<T> extends M<string> { }
|
||||
~
|
||||
!!! error TS2310: Type 'M<T>' recursively references itself as a base type.
|
||||
!!! error TS2506: 'M' is referenced directly or indirectly in its own base expression.
|
||||
(new M).blah;
|
||||
~~~~
|
||||
!!! error TS2339: Property 'blah' does not exist on type 'M<{}>'.
|
||||
@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/recursiveBaseCheck6.ts(1,7): error TS2310: Type 'S18<A>' recursively references itself as a base type.
|
||||
tests/cases/compiler/recursiveBaseCheck6.ts(1,7): error TS2506: 'S18' is referenced directly or indirectly in its own base expression.
|
||||
tests/cases/compiler/recursiveBaseCheck6.ts(2,13): error TS2339: Property 'blah' does not exist on type 'S18<{}>'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/recursiveBaseCheck6.ts (2 errors) ====
|
||||
class S18<A> extends S18<{ S19: A; }>{ }
|
||||
~~~
|
||||
!!! error TS2310: Type 'S18<A>' recursively references itself as a base type.
|
||||
!!! error TS2506: 'S18' is referenced directly or indirectly in its own base expression.
|
||||
(new S18()).blah;
|
||||
~~~~
|
||||
!!! error TS2339: Property 'blah' does not exist on type 'S18<{}>'.
|
||||
@ -20,11 +20,10 @@ tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(26,21): error T
|
||||
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(26,21): error TS2503: Cannot find namespace 'public'.
|
||||
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(27,17): error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
||||
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(27,17): error TS2304: Cannot find name 'package'.
|
||||
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(28,17): error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
||||
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(28,17): error TS2503: Cannot find namespace 'package'.
|
||||
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(28,17): error TS2304: Cannot find name 'package'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts (24 errors) ====
|
||||
==== tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts (23 errors) ====
|
||||
interface public { }
|
||||
|
||||
class Foo {
|
||||
@ -98,6 +97,4 @@ tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(28,17): error T
|
||||
!!! error TS2304: Cannot find name 'package'.
|
||||
class H extends package.A { }
|
||||
~~~~~~~
|
||||
!!! error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode.
|
||||
~~~~~~~
|
||||
!!! error TS2503: Cannot find namespace 'package'.
|
||||
!!! error TS2304: Cannot find name 'package'.
|
||||
@ -2,7 +2,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(24,25): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(24,27): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts(32,15): error TS2430: Interface 'B3<T>' incorrectly extends interface 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'T'.
|
||||
@ -44,7 +44,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
}
|
||||
|
||||
interface B extends A<Base> {
|
||||
~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
[x: number]: Derived; // error
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(24,21): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(24,23): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts(32,11): error TS2415: Class 'B3<T>' incorrectly extends base class 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'T'.
|
||||
@ -44,7 +44,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
}
|
||||
|
||||
class B extends A<Base> {
|
||||
~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
[x: number]: Derived; // error
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
Index signatures are incompatible.
|
||||
Type 'string' is not assignable to type 'Base'.
|
||||
Property 'foo' is missing in type 'String'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(20,21): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(20,23): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts(24,11): error TS2415: Class 'B3<T>' incorrectly extends base class 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
@ -44,7 +44,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
!!! error TS2415: Index signatures are incompatible.
|
||||
!!! error TS2415: Type 'string' is not assignable to type 'Base'.
|
||||
!!! error TS2415: Property 'foo' is missing in type 'String'.
|
||||
~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
!!! error TS2344: Property 'bar' is missing in type 'Base'.
|
||||
[x: number]: string; // error
|
||||
|
||||
@ -2,7 +2,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(24,25): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(24,27): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts(32,15): error TS2430: Interface 'B3<T>' incorrectly extends interface 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'T'.
|
||||
@ -44,7 +44,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
}
|
||||
|
||||
interface B extends A<Base> {
|
||||
~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
[x: string]: Derived; // error
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(24,21): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(24,23): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts(32,11): error TS2415: Class 'B3<T>' incorrectly extends base class 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
Type 'Base' is not assignable to type 'T'.
|
||||
@ -44,7 +44,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
}
|
||||
|
||||
class B extends A<Base> {
|
||||
~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
[x: string]: Derived; // error
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
Index signatures are incompatible.
|
||||
Type 'string' is not assignable to type 'Base'.
|
||||
Property 'foo' is missing in type 'String'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(20,21): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(20,23): error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
Property 'bar' is missing in type 'Base'.
|
||||
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts(24,11): error TS2415: Class 'B3<T>' incorrectly extends base class 'A<T>'.
|
||||
Index signatures are incompatible.
|
||||
@ -44,7 +44,7 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
|
||||
!!! error TS2415: Index signatures are incompatible.
|
||||
!!! error TS2415: Type 'string' is not assignable to type 'Base'.
|
||||
!!! error TS2415: Property 'foo' is missing in type 'String'.
|
||||
~~~~~~~
|
||||
~~~~
|
||||
!!! error TS2344: Type 'Base' does not satisfy the constraint 'Derived'.
|
||||
!!! error TS2344: Property 'bar' is missing in type 'Base'.
|
||||
[x: string]: string; // error
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(22,15): error TS2332: 'this' cannot be referenced in current location.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(38,25): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(38,25): error TS2507: Base expression is not of a constructor function type.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(44,9): error TS2332: 'this' cannot be referenced in current location.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9): error TS2332: 'this' cannot be referenced in current location.
|
||||
|
||||
@ -52,7 +52,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts(45,9):
|
||||
|
||||
class ErrClass3 extends this {
|
||||
~~~~
|
||||
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(3,16): error TS2334: 'this' cannot be referenced in a static property initializer.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(22,15): error TS2332: 'this' cannot be referenced in current location.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(28,13): error TS2331: 'this' cannot be referenced in a module or namespace body.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(38,25): error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(38,25): error TS2507: Base expression is not of a constructor function type.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(44,9): error TS2332: 'this' cannot be referenced in current location.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(45,9): error TS2332: 'this' cannot be referenced in current location.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(48,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
|
||||
@ -53,7 +53,7 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod
|
||||
|
||||
class ErrClass3 extends this {
|
||||
~~~~
|
||||
!!! error TS9002: Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.
|
||||
!!! error TS2507: Base expression is not of a constructor function type.
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
tests/cases/compiler/typeParameterAsBaseClass.ts(1,20): error TS2311: A class may only extend another class.
|
||||
tests/cases/compiler/typeParameterAsBaseClass.ts(1,20): error TS2304: Cannot find name 'T'.
|
||||
tests/cases/compiler/typeParameterAsBaseClass.ts(2,24): error TS2422: A class may only implement another class or interface.
|
||||
|
||||
|
||||
==== tests/cases/compiler/typeParameterAsBaseClass.ts (2 errors) ====
|
||||
class C<T> extends T {}
|
||||
~
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
!!! error TS2304: Cannot find name 'T'.
|
||||
class C2<T> implements T {}
|
||||
~
|
||||
!!! error TS2422: A class may only implement another class or interface.
|
||||
@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(4,20): error TS2311: A class may only extend another class.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(5,24): error TS2311: A class may only extend another class.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(4,20): error TS2304: Cannot find name 'T'.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(5,24): error TS2304: Cannot find name 'U'.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(7,24): error TS2312: An interface may only extend a class or another interface.
|
||||
tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(8,28): error TS2312: An interface may only extend a class or another interface.
|
||||
|
||||
@ -10,10 +10,10 @@ tests/cases/conformance/types/typeParameters/typeParameterAsBaseType.ts(8,28): e
|
||||
|
||||
class C<T> extends T { }
|
||||
~
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
!!! error TS2304: Cannot find name 'T'.
|
||||
class C2<T, U> extends U { }
|
||||
~
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
!!! error TS2304: Cannot find name 'U'.
|
||||
|
||||
interface I<T> extends T { }
|
||||
~
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/undeclaredBase.ts(1,37): error TS2305: Module 'M' has no exported member 'I'.
|
||||
tests/cases/compiler/undeclaredBase.ts(1,37): error TS2339: Property 'I' does not exist on type 'typeof M'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/undeclaredBase.ts (1 errors) ====
|
||||
module M { export class C extends M.I { } }
|
||||
~
|
||||
!!! error TS2305: Module 'M' has no exported member 'I'.
|
||||
!!! error TS2339: Property 'I' does not exist on type 'typeof M'.
|
||||
|
||||
|
||||
@ -4,14 +4,13 @@ tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(8,10): error TS2
|
||||
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(10,7): error TS2420: Class 'C' incorrectly implements interface 'Function'.
|
||||
Property 'apply' is missing in type 'C'.
|
||||
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(18,10): error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
||||
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(20,18): error TS2311: A class may only extend another class.
|
||||
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(22,10): error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
||||
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(22,10): error TS2347: Untyped function calls may not accept type arguments.
|
||||
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(28,10): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(35,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(41,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
|
||||
|
||||
==== tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts (10 errors) ====
|
||||
==== tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts (9 errors) ====
|
||||
// none of these function calls should be allowed
|
||||
var x = function () { return; };
|
||||
var r1 = x<number>();
|
||||
@ -43,12 +42,10 @@ tests/cases/compiler/untypedFunctionCallsWithTypeParameters1.ts(41,1): error TS2
|
||||
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
||||
|
||||
class C2 extends Function { } // error
|
||||
~~~~~~~~
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
var c3: C2;
|
||||
var r5 = c3<number>(); // error
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature.
|
||||
!!! error TS2347: Untyped function calls may not accept type arguments.
|
||||
|
||||
interface I {
|
||||
(number): number;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user