mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 05:17:43 -05:00
Be more conservative about reusing parameters.
This commit is contained in:
@@ -1924,9 +1924,13 @@ module ts {
|
||||
}
|
||||
|
||||
function isReusableParameter(node: Node) {
|
||||
// TODO: this most likely needs the same initializer check that
|
||||
// isReusableVariableDeclaration has.
|
||||
return node.kind === SyntaxKind.Parameter;
|
||||
if (node.kind !== SyntaxKind.Parameter) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// See the comment in isReusableVariableDeclaration for why we do this.
|
||||
var parameter = <ParameterDeclaration>node;
|
||||
return parameter.initializer === undefined;
|
||||
}
|
||||
|
||||
// Returns true if we should abort parsing.
|
||||
|
||||
Reference in New Issue
Block a user