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

45 lines
1.9 KiB
Plaintext
Raw Normal View History

tests/cases/compiler/superPropertyAccess1.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/superPropertyAccess1.ts(13,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
tests/cases/compiler/superPropertyAccess1.ts(19,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
tests/cases/compiler/superPropertyAccess1.ts(22,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/superPropertyAccess1.ts(24,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/superPropertyAccess1.ts (5 errors) ====
class C {
public foo() { }
public get x() {
~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-07-13 01:04:16 +02:00
return 1;
}
public bar() { }
}
class D extends C {
public foo() {
super.bar();
super.x; // error
~
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
2014-07-13 01:04:16 +02:00
}
constructor() {
super();
super.bar();
super.x; // error
~
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
2014-07-13 01:04:16 +02:00
}
public get y() {
~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-07-13 01:04:16 +02:00
super.bar();
super.x; // error
~
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
2014-07-13 01:04:16 +02:00
return 1;
}
}