Assert:only merge into transient symbols

This commit is contained in:
Nathan Shively-Sanders 2018-05-11 09:12:25 -07:00
parent 904f8df9c1
commit de9ff1b004

View file

@ -892,6 +892,7 @@ namespace ts {
function mergeSymbol(target: Symbol, source: Symbol) {
if (!(target.flags & getExcludedSymbolFlags(source.flags)) ||
(source.flags | target.flags) & SymbolFlags.JSContainer) {
Debug.assert(!!(target.flags & SymbolFlags.Transient));
// Javascript static-property-assignment declarations always merge, even though they are also values
if (source.flags & SymbolFlags.ValueModule && target.flags & SymbolFlags.ValueModule && target.constEnumOnlyModule && !source.constEnumOnlyModule) {
// reset flag when merging instantiated module into value module that has only const enums