Fix crash when attempting to merge an import with a local declaration (#18032)

* There should be no crash when attempting to merge an import with a local declaration

* Show symbol has actually merged within the module
This commit is contained in:
Wesley Wigham
2017-08-24 17:12:42 -07:00
committed by GitHub
parent 643a7e7e33
commit 62eaaf9206
4 changed files with 106 additions and 0 deletions

View File

@@ -19180,6 +19180,8 @@ namespace ts {
: DeclarationSpaces.ExportNamespace;
case SyntaxKind.ClassDeclaration:
case SyntaxKind.EnumDeclaration:
// A NamespaceImport declares an Alias, which is allowed to merge with other values within the module
case SyntaxKind.NamespaceImport:
return DeclarationSpaces.ExportType | DeclarationSpaces.ExportValue;
case SyntaxKind.ImportEqualsDeclaration:
let result = DeclarationSpaces.None;