29 lines
No EOL
1.1 KiB
Text
29 lines
No EOL
1.1 KiB
Text
tests/cases/compiler/collisionSuperAndLocalVarInConstructor.ts(10,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
tests/cases/compiler/collisionSuperAndLocalVarInConstructor.ts(17,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
|
|
|
|
==== tests/cases/compiler/collisionSuperAndLocalVarInConstructor.ts (2 errors) ====
|
|
var _super = 10; // No Error
|
|
class Foo {
|
|
constructor() {
|
|
var _super = 10; // No error
|
|
}
|
|
}
|
|
class b extends Foo {
|
|
constructor() {
|
|
super();
|
|
var _super = 10; // Should be error
|
|
~~~~~~
|
|
!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
}
|
|
}
|
|
class c extends Foo {
|
|
constructor() {
|
|
super();
|
|
var x = () => {
|
|
var _super = 10; // Should be error
|
|
~~~~~~
|
|
!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
}
|
|
}
|
|
} |