TypeScript/tests/baselines/reference/scopeCheckInsideStaticMethod1.errors.txt

19 lines
621 B
Plaintext
Raw Normal View History

tests/cases/compiler/scopeCheckInsideStaticMethod1.ts(6,7): error TS2304: Cannot find name 'v'.
tests/cases/compiler/scopeCheckInsideStaticMethod1.ts(8,12): error TS2339: Property 'p' does not exist on type 'typeof C'.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/scopeCheckInsideStaticMethod1.ts (2 errors) ====
class C {
private v;
public p;
static s;
static b() {
v = 1; // ERR
~
!!! error TS2304: Cannot find name 'v'.
2014-07-13 01:04:16 +02:00
C.s = 1;
this.p = 1; // ERR
~
!!! error TS2339: Property 'p' does not exist on type 'typeof C'.
2014-07-13 01:04:16 +02:00
}
}