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.
50 lines
3 KiB
Plaintext
50 lines
3 KiB
Plaintext
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(3,17): error TS2304: Cannot find name 'number'.
|
|
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(4,18): error TS2304: Cannot find name 'string'.
|
|
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(5,18): error TS2304: Cannot find name 'boolean'.
|
|
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 TS1133: Type reference 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 TS1133: Type reference expected.
|
|
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(9,24): error TS1005: ';' expected.
|
|
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(10,18): error TS2304: Cannot find name 'undefined'.
|
|
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 (11 errors) ====
|
|
// classes cannot extend primitives
|
|
|
|
class C extends number { }
|
|
~~~~~~
|
|
!!! error TS2304: Cannot find name 'number'.
|
|
class C2 extends string { }
|
|
~~~~~~
|
|
!!! error TS2304: Cannot find name 'string'.
|
|
class C3 extends boolean { }
|
|
~~~~~~~
|
|
!!! error TS2304: Cannot find name 'boolean'.
|
|
class C4 extends Void { }
|
|
~~~~
|
|
!!! error TS2304: Cannot find name 'Void'.
|
|
class C4a extends void {}
|
|
~~~~
|
|
!!! error TS1133: Type reference expected.
|
|
class C5 extends Null { }
|
|
~~~~
|
|
!!! error TS2304: Cannot find name 'Null'.
|
|
class C5a extends null { }
|
|
~~~~
|
|
!!! error TS1133: Type reference expected.
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
class C6 extends undefined { }
|
|
~~~~~~~~~
|
|
!!! error TS2304: Cannot find name 'undefined'.
|
|
class C7 extends Undefined { }
|
|
~~~~~~~~~
|
|
!!! error TS2304: Cannot find name 'Undefined'.
|
|
|
|
enum E { A }
|
|
class C8 extends E { }
|
|
~
|
|
!!! error TS2311: A class may only extend another class. |