Merge pull request #38364 from typescript-bot/pick/38351/release-3.9

🤖 Pick PR #38351 (Fix regression in name resolution i...) into release-3.9
This commit is contained in:
Daniel Rosenwasser authored and GitHub committed 2020-05-07 23:56:51 -07:00
commit 659677f6d0
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;