mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
46 lines
967 B
TypeScript
46 lines
967 B
TypeScript
//// [tests/cases/compiler/collisionThisExpressionAndLocalVarInProperty.ts] ////
|
|
|
|
//// [collisionThisExpressionAndLocalVarInProperty.ts]
|
|
class class1 {
|
|
public prop1 = {
|
|
doStuff: (callback) => () => {
|
|
var _this = 2;
|
|
return callback(this);
|
|
}
|
|
}
|
|
}
|
|
|
|
class class2 {
|
|
constructor() {
|
|
var _this = 2;
|
|
}
|
|
public prop1 = {
|
|
doStuff: (callback) => () => {
|
|
return callback(this);
|
|
}
|
|
}
|
|
}
|
|
|
|
//// [collisionThisExpressionAndLocalVarInProperty.js]
|
|
"use strict";
|
|
class class1 {
|
|
constructor() {
|
|
this.prop1 = {
|
|
doStuff: (callback) => () => {
|
|
var _this = 2;
|
|
return callback(this);
|
|
}
|
|
};
|
|
}
|
|
}
|
|
class class2 {
|
|
constructor() {
|
|
this.prop1 = {
|
|
doStuff: (callback) => () => {
|
|
return callback(this);
|
|
}
|
|
};
|
|
var _this = 2;
|
|
}
|
|
}
|