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.
64 lines
No EOL
2.1 KiB
Text
64 lines
No EOL
2.1 KiB
Text
tests/cases/compiler/autoLift2.ts(5,14): error TS2339: Property 'foo' does not exist on type 'A'.
|
|
tests/cases/compiler/autoLift2.ts(5,17): error TS1005: ';' expected.
|
|
tests/cases/compiler/autoLift2.ts(5,19): error TS2304: Cannot find name 'any'.
|
|
tests/cases/compiler/autoLift2.ts(6,14): error TS2339: Property 'bar' does not exist on type 'A'.
|
|
tests/cases/compiler/autoLift2.ts(6,17): error TS1005: ';' expected.
|
|
tests/cases/compiler/autoLift2.ts(6,19): error TS2304: Cannot find name 'any'.
|
|
tests/cases/compiler/autoLift2.ts(12,11): error TS2339: Property 'foo' does not exist on type 'A'.
|
|
tests/cases/compiler/autoLift2.ts(14,11): error TS2339: Property 'bar' does not exist on type 'A'.
|
|
tests/cases/compiler/autoLift2.ts(16,33): error TS2339: Property 'foo' does not exist on type 'A'.
|
|
tests/cases/compiler/autoLift2.ts(18,33): error TS2339: Property 'bar' does not exist on type 'A'.
|
|
|
|
|
|
==== tests/cases/compiler/autoLift2.ts (10 errors) ====
|
|
class A
|
|
|
|
{
|
|
constructor() {
|
|
this.foo: any;
|
|
~~~
|
|
!!! error TS2339: Property 'foo' does not exist on type 'A'.
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'any'.
|
|
this.bar: any;
|
|
~~~
|
|
!!! error TS2339: Property 'bar' does not exist on type 'A'.
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'any'.
|
|
}
|
|
|
|
|
|
baz() {
|
|
|
|
this.foo = "foo";
|
|
~~~
|
|
!!! error TS2339: Property 'foo' does not exist on type 'A'.
|
|
|
|
this.bar = "bar";
|
|
~~~
|
|
!!! error TS2339: Property 'bar' does not exist on type 'A'.
|
|
|
|
[1, 2].forEach((p) => this.foo);
|
|
~~~
|
|
!!! error TS2339: Property 'foo' does not exist on type 'A'.
|
|
|
|
[1, 2].forEach((p) => this.bar);
|
|
~~~
|
|
!!! error TS2339: Property 'bar' does not exist on type 'A'.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var a = new A();
|
|
|
|
a.baz();
|
|
|
|
|
|
|