mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
fix lookup regression again (#26762)
* fix lookup regression again * add test case
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
c327ab40bc
commit
038f665171
@@ -1212,7 +1212,7 @@ namespace ts {
|
||||
}
|
||||
if (meaning & SymbolFlags.Value && result.flags & SymbolFlags.Variable) {
|
||||
// expression inside parameter will lookup as normal variable scope when targeting es2015+
|
||||
if (compilerOptions.target && compilerOptions.target >= ScriptTarget.ES2015 && isParameter(lastLocation) && !isParameterPropertyDeclaration(lastLocation) && result.valueDeclaration !== lastLocation) {
|
||||
if (compilerOptions.target && compilerOptions.target >= ScriptTarget.ES2015 && isParameter(lastLocation) && !isParameterPropertyDeclaration(lastLocation) && result.valueDeclaration.pos > lastLocation.end) {
|
||||
useResult = false;
|
||||
}
|
||||
else if (result.flags & SymbolFlags.FunctionScopedVariable) {
|
||||
|
||||
Reference in New Issue
Block a user