34 lines
No EOL
1 KiB
Text
34 lines
No EOL
1 KiB
Text
==== tests/cases/compiler/emitThisInSuperMethodCall.ts (3 errors) ====
|
|
class User {
|
|
sayHello() {
|
|
}
|
|
}
|
|
|
|
class RegisteredUser extends User {
|
|
f() {
|
|
() => {
|
|
function inner() {
|
|
super.sayHello();
|
|
~~~~~
|
|
!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class
|
|
}
|
|
};
|
|
}
|
|
g() {
|
|
function inner() {
|
|
() => {
|
|
super.sayHello();
|
|
~~~~~
|
|
!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class
|
|
}
|
|
}
|
|
}
|
|
h() {
|
|
function inner() {
|
|
super.sayHello();
|
|
~~~~~
|
|
!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class
|
|
}
|
|
}
|
|
}
|
|
|