39 lines
No EOL
1.4 KiB
Text
39 lines
No EOL
1.4 KiB
Text
tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(13,9): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
tests/cases/compiler/collisionSuperAndLocalFunctionInMethod.ts(22,13): 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
|
|
}
|
|
} |