23 lines
No EOL
725 B
Text
23 lines
No EOL
725 B
Text
==== tests/cases/compiler/collisionSuperAndLocalVarInMethod.ts (2 errors) ====
|
|
var _super = 10; // No Error
|
|
class Foo {
|
|
x() {
|
|
var _super = 10; // No error
|
|
}
|
|
}
|
|
class b extends Foo {
|
|
public foo() {
|
|
var _super = 10; // Should be error
|
|
~~~~~~
|
|
!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
}
|
|
}
|
|
class c extends Foo {
|
|
public foo() {
|
|
var x = () => {
|
|
var _super = 10; // Should be error
|
|
~~~~~~
|
|
!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.
|
|
}
|
|
}
|
|
} |