diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index bc7d587e7a7..6d913f7360c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1012,7 +1012,7 @@ module ts { var symbol = resolveName(enclosingDeclaration, (firstIdentifier).text, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined); // Verify if the symbol is accessible - return hasVisibleDeclarations(symbol) || { + return (symbol && hasVisibleDeclarations(symbol)) || { accessibility: SymbolAccessibility.NotAccessible, errorSymbolName: getTextOfNode(firstIdentifier), errorNode: firstIdentifier