mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-24 17:18:56 -05:00
Preserve 'Cannot find namespace' errors
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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'.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user