diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 04766f22c4e..5e599a27c6e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -350,9 +350,9 @@ module ts { } else if (location.kind === SyntaxKind.SourceFile || (location.kind === SyntaxKind.ModuleDeclaration && (location).name.kind === SyntaxKind.StringLiteral)) { - result = getSymbol(getSymbolOfNode(location).exports, "default", meaning & SymbolFlags.ModuleMember); + result = getSymbolOfNode(location).exports["default"]; let localSymbol = getLocalSymbolForExportDefault(result); - if (result && (result.flags & meaning) && localSymbol && localSymbol.name === name) { + if (result && localSymbol && (result.flags & meaning) && localSymbol.name === name) { break loop; } result = undefined; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 3ddd8338960..0bb0065d1b0 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1695,7 +1695,7 @@ module ts { } export function getLocalSymbolForExportDefault(symbol: Symbol) { - return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & NodeFlags.Default) ? symbol.valueDeclaration.localSymbol : undefined; + return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & NodeFlags.Default) ? symbol.valueDeclaration.localSymbol : undefined; } /**