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.
57 lines
No EOL
2 KiB
Text
57 lines
No EOL
2 KiB
Text
tests/cases/compiler/bases.ts(7,14): error TS2339: Property 'y' does not exist on type 'B'.
|
|
tests/cases/compiler/bases.ts(7,15): error TS1005: ';' expected.
|
|
tests/cases/compiler/bases.ts(7,17): error TS2304: Cannot find name 'any'.
|
|
tests/cases/compiler/bases.ts(11,7): error TS2420: Class 'C' incorrectly implements interface 'I'.
|
|
Property 'x' is missing in type 'C'.
|
|
tests/cases/compiler/bases.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call.
|
|
tests/cases/compiler/bases.ts(13,14): error TS2339: Property 'x' does not exist on type 'C'.
|
|
tests/cases/compiler/bases.ts(13,15): error TS1005: ';' expected.
|
|
tests/cases/compiler/bases.ts(13,17): error TS2304: Cannot find name 'any'.
|
|
tests/cases/compiler/bases.ts(17,9): error TS2339: Property 'x' does not exist on type 'C'.
|
|
tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist on type 'C'.
|
|
|
|
|
|
==== tests/cases/compiler/bases.ts (10 errors) ====
|
|
interface I {
|
|
x;
|
|
}
|
|
|
|
class B {
|
|
constructor() {
|
|
this.y: any;
|
|
~
|
|
!!! error TS2339: Property 'y' does not exist on type 'B'.
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'any'.
|
|
}
|
|
}
|
|
|
|
class C extends B implements I {
|
|
~
|
|
!!! error TS2420: Class 'C' incorrectly implements interface 'I'.
|
|
!!! error TS2420: Property 'x' is missing in type 'C'.
|
|
constructor() {
|
|
~~~~~~~~~~~~~~~
|
|
this.x: any;
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
~
|
|
!!! error TS2339: Property 'x' does not exist on type 'C'.
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'any'.
|
|
}
|
|
~~~~~
|
|
!!! error TS2377: Constructors for derived classes must contain a 'super' call.
|
|
}
|
|
|
|
new C().x;
|
|
~
|
|
!!! error TS2339: Property 'x' does not exist on type 'C'.
|
|
new C().y;
|
|
~
|
|
!!! error TS2339: Property 'y' does not exist on type 'C'.
|
|
|
|
|