Preserve 'Cannot find namespace' errors

This commit is contained in:
Justin Bay
2016-08-15 02:23:39 -04:00
parent affa6db3db
commit fde0a28988
3 changed files with 7 additions and 7 deletions

View File

@@ -994,7 +994,7 @@ namespace ts {
const strictlyValueMeanings = SymbolFlags.Value & ~SymbolFlags.Type;
const strictlyTypeMeanings = SymbolFlags.Type & ~SymbolFlags.Value;
if (!(meaning & strictlyValueMeanings)) {
if (!(meaning & strictlyValueMeanings) || meaning & SymbolFlags.NamespaceModule) {
return false;
}

View File

@@ -1,6 +1,6 @@
tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(5,12): error TS2503: Cannot find namespace 'V'.
tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(11,12): error TS2503: Cannot find namespace 'C'.
tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(23,12): error TS2691: Cannot find name 'I'. A type exists with this name, but no value.
tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts(23,12): error TS2503: Cannot find namespace 'I'.
==== tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIdentifiers.ts (3 errors) ====
@@ -32,5 +32,5 @@ tests/cases/conformance/internalModules/importDeclarations/invalidImportAliasIde
import i = I;
~
!!! error TS2691: Cannot find name 'I'. A type exists with this name, but no value.
!!! error TS2503: Cannot find namespace 'I'.

View File

@@ -16,9 +16,9 @@ tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(21,9): error TS
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(21,17): error TS1213: Identifier expected. 'private' is a reserved word in strict mode. Class definitions are automatically in strict mode.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(23,20): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(25,20): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(25,20): error TS2691: Cannot find name 'public'. A type exists with this name, but no value.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(25,20): error TS2503: Cannot find namespace 'public'.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(26,21): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(26,21): error TS2691: Cannot find name 'public'. A type exists with this name, but no value.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(26,21): error TS2503: Cannot find namespace 'public'.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(27,17): error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(27,17): error TS2304: Cannot find name 'package'.
tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(28,17): error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode.
@@ -88,12 +88,12 @@ tests/cases/compiler/strictModeReservedWordInClassDeclaration.ts(28,17): error T
~~~~~~
!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode.
~~~~~~
!!! error TS2691: Cannot find name 'public'. A type exists with this name, but no value.
!!! error TS2503: Cannot find namespace 'public'.
class F1 implements public.private.implements { }
~~~~~~
!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode.
~~~~~~
!!! error TS2691: Cannot find name 'public'. A type exists with this name, but no value.
!!! error TS2503: Cannot find namespace 'public'.
class G extends package { }
~~~~~~~
!!! error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode.