33 lines
No EOL
1.2 KiB
Text
33 lines
No EOL
1.2 KiB
Text
tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(12,18): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts(20,22): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
|
|
|
|
==== tests/cases/compiler/collisionSuperAndLocalFunctionInConstructor.ts (2 errors) ====
|
|
function _super() { // No error
|
|
}
|
|
class Foo {
|
|
constructor() {
|
|
function _super() { // No error
|
|
}
|
|
}
|
|
}
|
|
class b extends Foo {
|
|
constructor() {
|
|
super();
|
|
function _super() { // Should be error
|
|
~~~~~~
|
|
!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
}
|
|
}
|
|
}
|
|
class c extends Foo {
|
|
constructor() {
|
|
super();
|
|
var x = () => {
|
|
function _super() { // Should be error
|
|
~~~~~~
|
|
!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
}
|
|
}
|
|
}
|
|
} |