TypeScript/tests/cases/compiler/underscoreThisInDerivedClass02.ts
Wesley Wigham 9b558f9535
Remove _this, _super, and _newTarget name conflict errors (#22890)
* Add new generated name kind for reused transpiler variables

* Remove error on _super or _newTarget conflict

* Add test with super helper conflict

* Remove error on _this conflict

* Fix lint

* Use flags instead of generated kinds, inline some things

* Accept rename

* Remove trailing whitespace

* Move helper emit into printer, rather than emitter"

* passthru module and target

* New test, accept baselines

* Make members private
2018-03-30 17:43:37 -07:00

18 lines
312 B
TypeScript

// @target es5
// Original test intent:
// Errors on '_this' should be reported in derived constructors,
// even if 'super()' is not called.
class C {
constructor() {
return {};
}
}
class D extends C {
constructor() {
super();
var _this = "uh-oh?";
}
}