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

38 lines
1.1 KiB
Text
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/superPropertyAccess1.ts (5 errors) ====
class C {
public foo() { }
public get x() {
~
!!! 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
~
!!! 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
~
!!! 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() {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
super.bar();
super.x; // error
~
!!! 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;
}
}