Re-added fourslash tests, corrected failures.

This commit is contained in:
Daniel Rosenwasser committed 2014-08-25 17:35:18 -07:00
1 parent 144eb8dc0d
commit f948f5d3f7
7 files changed
+25 -15

No files matched your search

+12 -2
View File
@@ -2224,7 +2224,7 @@ module ts {
var searchMeaning = getIntersectingMeaningFromDeclarations(getMeaningFromLocation(node), symbol.getDeclarations());
// Get the text to search for, we need to normalize it as external module names will have quote
var symbolName = getNormalizedSymbolName(symbol.getName());
var symbolName = getNormalizedSymbolName(symbol);
var scope = getSymbolScope(symbol);
@@ -2245,7 +2245,17 @@ module ts {
return result;
function getNormalizedSymbolName(name: string): string {
function getNormalizedSymbolName(symbol: Symbol): string {
// Special case for function expressions, whose names are solely local to their bodies.
var functionExpression = getDeclarationOfKind(symbol, SyntaxKind.FunctionExpression);
if (functionExpression && functionExpression.name) {
var name = functionExpression.name.text;
}
else {
var name = symbol.name;
}
var length = name.length;
if (length >= 2 && name.charCodeAt(0) === CharacterCodes.doubleQuote && name.charCodeAt(length - 1) === CharacterCodes.doubleQuote) {
return name.substring(1, length - 1);