TypeScript/tests/baselines/reference/emitThisInSuperMethodCall.errors.txt
2015-06-19 15:45:18 -07:00

39 lines
1.6 KiB
Plaintext

tests/cases/compiler/emitThisInSuperMethodCall.ts(10,17): error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.
tests/cases/compiler/emitThisInSuperMethodCall.ts(17,17): error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.
tests/cases/compiler/emitThisInSuperMethodCall.ts(23,13): error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.
==== tests/cases/compiler/emitThisInSuperMethodCall.ts (3 errors) ====
class User {
sayHello() {
}
}
class RegisteredUser extends User {
f() {
() => {
function inner() {
super.sayHello();
~~~~~
!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.
}
};
}
g() {
function inner() {
() => {
super.sayHello();
~~~~~
!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.
}
}
}
h() {
function inner() {
super.sayHello();
~~~~~
!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.
}
}
}