2014-09-12 22:35:07 +02:00
tests/cases/compiler/superPropertyAccess1.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/superPropertyAccess1.ts(22,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2014-09-18 02:05:45 +02:00
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(24,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
2014-09-12 22:35:07 +02:00
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/superPropertyAccess1.ts (5 errors) ====
class C {
public foo() { }
public get x() {
~
2014-09-12 00:19:57 +02:00
!!! 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
~
2014-09-18 02:05:45 +02:00
!!! 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
~
2014-09-18 02:05:45 +02:00
!!! 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() {
~
2014-09-12 00:19:57 +02:00
!!! 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
~
2014-09-18 02:05:45 +02:00
!!! 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;
}
}