mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #1399 from Microsoft/checkSymbolExists
Check if the symbol exists before checking its visibility in isEntityNameVisible.
This commit is contained in:
@@ -1012,7 +1012,7 @@ module ts {
|
||||
var symbol = resolveName(enclosingDeclaration, (<Identifier>firstIdentifier).text, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined);
|
||||
|
||||
// Verify if the symbol is accessible
|
||||
return hasVisibleDeclarations(symbol) || <SymbolVisibilityResult>{
|
||||
return (symbol && hasVisibleDeclarations(symbol)) || <SymbolVisibilityResult>{
|
||||
accessibility: SymbolAccessibility.NotAccessible,
|
||||
errorSymbolName: getTextOfNode(firstIdentifier),
|
||||
errorNode: firstIdentifier
|
||||
|
||||
Reference in New Issue
Block a user