2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/autoLift2.ts(5,17): error TS1005: ';' expected.
|
|
|
|
tests/cases/compiler/autoLift2.ts(6,17): error TS1005: ';' expected.
|
|
|
|
tests/cases/compiler/autoLift2.ts(5,14): error TS2339: Property 'foo' does not exist on type 'A'.
|
|
|
|
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,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'.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/autoLift2.ts (10 errors) ====
|
|
|
|
class A
|
|
|
|
|
|
|
|
{
|
|
|
|
constructor() {
|
|
|
|
this.foo: any;
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1005: ';' expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2339: Property 'foo' does not exist on type 'A'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'any'.
|
2014-07-13 01:04:16 +02:00
|
|
|
this.bar: any;
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1005: ';' expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2339: Property 'bar' does not exist on type 'A'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'any'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
baz() {
|
|
|
|
|
|
|
|
this.foo = "foo";
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2339: Property 'foo' does not exist on type 'A'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
this.bar = "bar";
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2339: Property 'bar' does not exist on type 'A'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
[1, 2].forEach((p) => this.foo);
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2339: Property 'foo' does not exist on type 'A'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
[1, 2].forEach((p) => this.bar);
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2339: Property 'bar' does not exist on type 'A'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var a = new A();
|
|
|
|
|
|
|
|
a.baz();
|
|
|
|
|
|
|
|
|
|
|
|
|