@@ -13381,7 +13381,7 @@ namespace ts {
13381
13381
case SyntaxKind.ClassExpression:
13382
13382
let name = (<FunctionExpression|ClassExpression>location).name;
13383
13383
if (name) {
13384
- copySymbol(location.symbol, meaning, name.text );
13384
+ copySymbol(name.text, location.symbol, meaning);
13385
13385
}
13386
13386
break;
13387
13387
}
@@ -13396,12 +13396,11 @@ namespace ts {
13396
13396
/**
13397
13397
* Copy the given symbol into symbol tables if the symbol has the given meaning
13398
13398
* and it doesn't already existed in the symbol table
13399
- *
13399
+ * @param key a key for storing in symbol table; if null, use symbol.name
13400
13400
* @param symbol the symbol to be added into symbol table
13401
13401
* @param meaning meaning of symbol to filter by before adding to symbol table
13402
- * @param key a key for storing in symbol table; if null, use symbol.name
13403
13402
*/
13404
- function copySymbol(symbol: Symbol, meaning: SymbolFlags, key?: string ): void {
13403
+ function copySymbol(key: string, symbol: Symbol, meaning: SymbolFlags ): void {
13405
13404
if (symbol.flags & meaning) {
13406
13405
let id = key || symbol.name;
13407
13406
if (!hasProperty(symbols, id)) {
@@ -13413,7 +13412,8 @@ namespace ts {
13413
13412
function copySymbols(source: SymbolTable, meaning: SymbolFlags): void {
13414
13413
if (meaning) {
13415
13414
for (let id in source) {
13416
- copySymbol(source[id], meaning);
13415
+ let symbol = source[id];
13416
+ copySymbol(symbol.name, symbol, meaning);
13417
13417
}
13418
13418
}
13419
13419
}
0 commit comments