From 6f3f690a8d7409db87ef4a5ab322f83f305ce26c Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 15 Apr 2016 11:31:26 -0700 Subject: [PATCH] revert back fix for implicit exports of imports --- src/compiler/binder.ts | 2 +- tests/baselines/reference/newNamesInGlobalAugmentations1.js | 2 +- .../baselines/reference/newNamesInGlobalAugmentations1.symbols | 2 +- tests/baselines/reference/newNamesInGlobalAugmentations1.types | 2 +- tests/cases/compiler/newNamesInGlobalAugmentations1.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 0d71abcf12..9311aa7cc2 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -355,7 +355,7 @@ namespace ts { function declareModuleMember(node: Declaration, symbolFlags: SymbolFlags, symbolExcludes: SymbolFlags): Symbol { const hasExportModifier = getCombinedNodeFlags(node) & NodeFlags.Export; if (symbolFlags & SymbolFlags.Alias) { - if (node.kind === SyntaxKind.ExportSpecifier || (node.kind === SyntaxKind.ImportEqualsDeclaration && (hasExportModifier || container.flags & NodeFlags.ExportContext))) { + if (node.kind === SyntaxKind.ExportSpecifier || (node.kind === SyntaxKind.ImportEqualsDeclaration && hasExportModifier)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { diff --git a/tests/baselines/reference/newNamesInGlobalAugmentations1.js b/tests/baselines/reference/newNamesInGlobalAugmentations1.js index 053fe46fd4..0400f4c375 100644 --- a/tests/baselines/reference/newNamesInGlobalAugmentations1.js +++ b/tests/baselines/reference/newNamesInGlobalAugmentations1.js @@ -13,7 +13,7 @@ declare global { } class Cls {x} let [a, b]: number[]; - import X = M.M1.x; + export import X = M.M1.x; } //// [main.ts] diff --git a/tests/baselines/reference/newNamesInGlobalAugmentations1.symbols b/tests/baselines/reference/newNamesInGlobalAugmentations1.symbols index eab27b632e..6215132dd0 100644 --- a/tests/baselines/reference/newNamesInGlobalAugmentations1.symbols +++ b/tests/baselines/reference/newNamesInGlobalAugmentations1.symbols @@ -26,7 +26,7 @@ declare global { >a : Symbol(a, Decl(f1.d.ts, 11, 9)) >b : Symbol(b, Decl(f1.d.ts, 11, 11)) - import X = M.M1.x; + export import X = M.M1.x; >X : Symbol(X, Decl(f1.d.ts, 11, 25)) >M : Symbol(M, Decl(f1.d.ts, 1, 10)) >M1 : Symbol(M.M1, Decl(f1.d.ts, 3, 17)) diff --git a/tests/baselines/reference/newNamesInGlobalAugmentations1.types b/tests/baselines/reference/newNamesInGlobalAugmentations1.types index e1331709d2..a9b879fb4c 100644 --- a/tests/baselines/reference/newNamesInGlobalAugmentations1.types +++ b/tests/baselines/reference/newNamesInGlobalAugmentations1.types @@ -26,7 +26,7 @@ declare global { >a : number >b : number - import X = M.M1.x; + export import X = M.M1.x; >X : number >M : typeof M >M1 : typeof M.M1 diff --git a/tests/cases/compiler/newNamesInGlobalAugmentations1.ts b/tests/cases/compiler/newNamesInGlobalAugmentations1.ts index 2210235325..73ed4e5e2e 100644 --- a/tests/cases/compiler/newNamesInGlobalAugmentations1.ts +++ b/tests/cases/compiler/newNamesInGlobalAugmentations1.ts @@ -12,7 +12,7 @@ declare global { } class Cls {x} let [a, b]: number[]; - import X = M.M1.x; + export import X = M.M1.x; } // @filename: main.ts