Be more conservative about reusing parameters.
This commit is contained in:
parent
a79e8e928b
commit
17dd6c2de0
1 changed files with 7 additions and 3 deletions
|
@ -1924,9 +1924,13 @@ module ts {
|
||||||
}
|
}
|
||||||
|
|
||||||
function isReusableParameter(node: Node) {
|
function isReusableParameter(node: Node) {
|
||||||
// TODO: this most likely needs the same initializer check that
|
if (node.kind !== SyntaxKind.Parameter) {
|
||||||
// isReusableVariableDeclaration has.
|
return false;
|
||||||
return node.kind === SyntaxKind.Parameter;
|
}
|
||||||
|
|
||||||
|
// 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.
|
// Returns true if we should abort parsing.
|
||||||
|
|
Loading…
Reference in a new issue