mergeSymbol error uses first decl not valueDecl

Previously it assumed valueDeclaration was present, which is not true
for type aliases.
This commit is contained in:
Nathan Shively-Sanders 2017-04-18 16:18:27 -07:00
parent 6de4693118
commit effa032d5d

View file

@ -574,7 +574,7 @@ namespace ts {
recordMergedSymbol(target, source);
}
else if (target.flags & SymbolFlags.NamespaceModule) {
error(source.valueDeclaration.name, Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
error(source.declarations[0].name, Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
}
else {
const message = target.flags & SymbolFlags.BlockScopedVariable || source.flags & SymbolFlags.BlockScopedVariable