Skip to content

Commit 2e99323

Browse files
committed
use decl key value if any
1 parent 04fd365 commit 2e99323

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6288,7 +6288,7 @@ namespace ts {
62886288
// If we have an existing early-bound member, combine its declarations so that we can
62896289
// report an error at each declaration.
62906290
const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
6291-
const name = declarationNameToString(decl.name);
6291+
const name = (<LiteralType>type).value || declarationNameToString(decl.name)
62926292
forEach(declarations, declaration => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_declaration_0, name));
62936293
error(decl.name || decl, Diagnostics.Duplicate_declaration_0, name);
62946294
lateSymbol = createSymbol(SymbolFlags.None, memberName, CheckFlags.Late);

0 commit comments

Comments
 (0)