Always tack on a return statement for '_this' in derived classes.

This commit is contained in:
Daniel Rosenwasser
2016-09-02 00:30:15 -07:00
parent 9c6e148d6e
commit cd5e76b23c

View File

@@ -790,7 +790,7 @@ namespace ts {
const body = saveStateAndInvoke(constructor, hasSynthesizedSuper ? transformConstructorBodyWithSynthesizedSuper : transformConstructorBodyWithoutSynthesizedSuper);
addRange(statements, body);
}
if (constructor ? hasSynthesizedSuper : extendsClauseElement) {
if (extendsClauseElement) {
statements.push(
createReturn(
createIdentifier("_this")