mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
46 lines
1.0 KiB
TypeScript
46 lines
1.0 KiB
TypeScript
//// [tests/cases/compiler/collisionSuperAndLocalVarInProperty.ts] ////
|
|
|
|
//// [collisionSuperAndLocalVarInProperty.ts]
|
|
var _super = 10; // No Error
|
|
class Foo {
|
|
public prop1 = {
|
|
doStuff: () => {
|
|
var _super = 10; // No error
|
|
}
|
|
}
|
|
public _super = 10; // No error
|
|
}
|
|
class b extends Foo {
|
|
public prop2 = {
|
|
doStuff: () => {
|
|
var _super = 10; // Should be error
|
|
}
|
|
}
|
|
public _super = 10; // No error
|
|
}
|
|
|
|
//// [collisionSuperAndLocalVarInProperty.js]
|
|
"use strict";
|
|
var _super = 10; // No Error
|
|
class Foo {
|
|
constructor() {
|
|
this.prop1 = {
|
|
doStuff: () => {
|
|
var _super = 10; // No error
|
|
}
|
|
};
|
|
this._super = 10; // No error
|
|
}
|
|
}
|
|
class b extends Foo {
|
|
constructor() {
|
|
super(...arguments);
|
|
this.prop2 = {
|
|
doStuff: () => {
|
|
var _super = 10; // Should be error
|
|
}
|
|
};
|
|
this._super = 10; // No error
|
|
}
|
|
}
|