TypeScript/tests/cases/conformance/salsa/jsContainerMergeJsContainer.ts
Nathan Shively-Sanders 0ba8998c82
Fix stack overflow in merge symbol (#24134)
* JS initializers use original valueDecl, not mutated

target's valueDeclaration is set to the source's if it is not present.
This makes it incorrect to use getJSInitializerSymbol because it relies
on the symbol's valueDeclaration.

This fix just saves the original valueDeclaration before mutating and
uses that.

* Compare merged targetInitializer to target

Instead of the unmerged one

* Add test of stack overflow
2018-05-15 12:49:54 -07:00

11 lines
157 B
TypeScript

// @noEmit: true
// @allowJs: true
// @checkJs: true
// #24131
// @Filename: a.js
const a = {};
a.d = function() {};
// @Filename: b.js
a.d.prototype = {};