From 4c18b2bcf814b8d91c655eedcb1e5926634eb2dc Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 2 Jun 2015 17:41:34 -0700 Subject: [PATCH] Simplify code. --- src/compiler/binder.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 1b65ccd63ec..ea589891241 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -513,13 +513,12 @@ module ts { // We do that by making an anonymous type literal symbol, and then setting the function // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable // from an actual type literal symbol you would have gotten had you used the long form. - let name = getDeclarationName(node); - let symbol = createSymbol(SymbolFlags.Signature, name); + let symbol = createSymbol(SymbolFlags.Signature, getDeclarationName(node)); addDeclarationToSymbol(symbol, node, SymbolFlags.Signature); let typeLiteralSymbol = createSymbol(SymbolFlags.TypeLiteral, "__type"); addDeclarationToSymbol(typeLiteralSymbol, node, SymbolFlags.TypeLiteral); - typeLiteralSymbol.members = { [name]: symbol }; + typeLiteralSymbol.members = { [symbol.name]: symbol }; } function bindAnonymousDeclaration(node: Declaration, symbolFlags: SymbolFlags, name: string) {