TypeScript/tests/baselines/reference/superPropertyAccess1.errors.txt
2014-09-17 17:05:45 -07:00

45 lines
1.9 KiB
Plaintext

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.
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
==== 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.
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
}
constructor() {
super();
super.bar();
super.x; // error
~
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
}
public get y() {
~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
super.bar();
super.x; // error
~
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword
return 1;
}
}