* 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
10 lines
157 B
TypeScript
10 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 = {};
|