f1a2e41a8a
This was we don't get noisy baselines just because a different phase of the compiler reported the diagnostic. This helps with Yui's refactoring work to move grammar checks into the type checker.
37 lines
1.8 KiB
Plaintext
37 lines
1.8 KiB
Plaintext
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(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 TS1133: Type reference expected.
|
|
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(16,20): error TS1005: ';' expected.
|
|
|
|
|
|
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts (6 errors) ====
|
|
interface I {
|
|
foo: string;
|
|
}
|
|
class C extends I { } // error
|
|
~
|
|
!!! error TS2311: A class may only extend another class.
|
|
|
|
class C2 extends { foo: string; } { } // error
|
|
var x: { foo: string; }
|
|
class C3 extends x { } // error
|
|
~
|
|
!!! error TS2304: Cannot find name 'x'.
|
|
|
|
module M { export var x = 1; }
|
|
class C4 extends M { } // error
|
|
~
|
|
!!! error TS2304: Cannot find name 'M'.
|
|
|
|
function foo() { }
|
|
class C5 extends foo { } // error
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'foo'.
|
|
|
|
class C6 extends []{ } // error
|
|
~
|
|
!!! error TS1133: Type reference expected.
|
|
~
|
|
!!! error TS1005: ';' expected. |