Cherry-pick PR #38351 into release-3.9

Component commits:
39e68564ff Fix regression in name resolution in parameter
This commit is contained in:
Ron Buckton authored and typescript-bot committed 2020-05-06 16:05:17 +00:00
1 parent 90570dfe09
commit e6709a4cd4
2 files changed
+16 -1

No files matched your search

+3 -1
View File
@@ -1887,7 +1887,9 @@ namespace ts {
lastLocation === (location as BindingElement).name && isBindingPattern(lastLocation))) {
const root = getRootDeclaration(location);
if (root.kind === SyntaxKind.Parameter) {
associatedDeclarationForContainingInitializerOrBindingName = location as BindingElement;
if (!associatedDeclarationForContainingInitializerOrBindingName) {
associatedDeclarationForContainingInitializerOrBindingName = location as BindingElement;
}
}
}
break;