Always perform this captures after default & rest parameters.

This commit is contained in:
Daniel Rosenwasser
2016-09-03 00:30:40 -07:00
parent d8846dd495
commit 86088d0e7e

View File

@@ -791,10 +791,10 @@ namespace ts {
}
if (constructor) {
Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!");
statementOffset = declareOrCaptureThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, statementOffset);
addDefaultValueAssignmentsIfNeeded(statements, constructor);
addRestParameterIfNeeded(statements, constructor, hasSynthesizedSuper);
Debug.assert(statementOffset >= 0, "statementOffset not initialized correctly!");
statementOffset = declareOrCaptureThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, statementOffset);
}
addDefaultSuperCallIfNeeded(statements, constructor, extendsClauseElement, hasSynthesizedSuper);