Ensure we find export default declaration targets if we search for them by name

This commit is contained in:
Mohamed Hegazy committed 2015-03-30 16:59:34 -07:00
1 parent b180324da0
commit bea7221174
7 files changed
+145

No files matched your search

+7
View File
@@ -349,6 +349,13 @@ module ts {
}
result = undefined;
}
else if (location.kind === SyntaxKind.SourceFile) {
result = getSymbol(getSymbolOfNode(location).exports, "default", meaning & SymbolFlags.ModuleMember);
if (result && (result.flags & meaning) && result.valueDeclaration && (result.valueDeclaration.flags & NodeFlags.Default) && result.valueDeclaration.localSymbol.name === name) {
break loop;
}
result = undefined;
}
break;
case SyntaxKind.EnumDeclaration:
if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & SymbolFlags.EnumMember)) {