diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5cd71544272f0..fb361b64cc8ad 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