37 lines
No EOL
1.3 KiB
Text
37 lines
No EOL
1.3 KiB
Text
tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(13,18): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(22,22): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
|
|
|
|
==== tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts (2 errors) ====
|
|
function _super() { // No error
|
|
}
|
|
class Foo {
|
|
x() {
|
|
function _super() { // No error
|
|
}
|
|
}
|
|
_super() { // No error
|
|
}
|
|
}
|
|
class b extends Foo {
|
|
public foo() {
|
|
function _super() { // should be error
|
|
~~~~~~
|
|
!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
}
|
|
}
|
|
_super() { // No Error
|
|
}
|
|
}
|
|
class c extends Foo {
|
|
public foo() {
|
|
var x = () => {
|
|
function _super() { // should be error
|
|
~~~~~~
|
|
!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
}
|
|
}
|
|
}
|
|
_super() { // No error
|
|
}
|
|
} |