diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 340bf47820..16f2a59a58 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -973,6 +973,10 @@ namespace ts { else { let bindingName = node.name ? node.name.text : "__class"; bindAnonymousDeclaration(node, SymbolFlags.Class, bindingName); + // Add name of class expression into the map for semantic classifier + if (node.name) { + classifiableNames[node.name.text] = node.name.text; + } } let symbol = node.symbol; @@ -1062,4 +1066,4 @@ namespace ts { : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); } } -} +}