Skip to content

Commit effa032

Browse files
committed
mergeSymbol error uses first decl not valueDecl
Previously it assumed valueDeclaration was present, which is not true for type aliases.
1 parent 6de4693 commit effa032

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
@@ -574,7 +574,7 @@ namespace ts {
574574
recordMergedSymbol(target, source);
575575
}
576576
else if (target.flags & SymbolFlags.NamespaceModule) {
577-
error(source.valueDeclaration.name, Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
577+
error(source.declarations[0].name, Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
578578
}
579579
else {
580580
const message = target.flags & SymbolFlags.BlockScopedVariable || source.flags & SymbolFlags.BlockScopedVariable

0 commit comments

Comments
 (0)