File tree Expand file tree Collapse file tree
tests/baselines/reference Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -915,8 +915,11 @@ namespace ts {
915915 }
916916 if ((source.flags | target.flags) & SymbolFlags.JSContainer) {
917917 const sourceInitializer = getJSInitializerSymbol(source);
918- const targetInitializer = getJSInitializerSymbol(target);
918+ let targetInitializer = getJSInitializerSymbol(target);
919919 if (sourceInitializer !== source || targetInitializer !== target) {
920+ if (!(targetInitializer.flags & SymbolFlags.Transient)) {
921+ targetInitializer = cloneSymbol(targetInitializer);
922+ }
920923 mergeSymbol(targetInitializer, sourceInitializer);
921924 }
922925 }
@@ -19452,7 +19455,7 @@ namespace ts {
1945219455 }
1945319456
1945419457 const links = getNodeLinks(node);
19455- const type = getTypeOfSymbol(node.symbol);
19458+ const type = getTypeOfSymbol(getMergedSymbol( node.symbol) );
1945619459 if (isTypeAny(type)) {
1945719460 return type;
1945819461 }
Original file line number Diff line number Diff line change 11=== tests/cases/conformance/salsa/def.js ===
22var Outer = {};
3- >Outer : typeof Outer
4- >{} : typeof Outer
3+ >Outer : { [x: string]: any; Inner(): void; }
4+ >{} : { [x: string]: any; Inner(): void; }
55
66=== tests/cases/conformance/salsa/work.js ===
77Outer.Inner = function () {}
88>Outer.Inner = function () {} : () => void
99>Outer.Inner : () => void
10- >Outer : typeof Outer
10+ >Outer : { [x: string]: any; Inner(): void; }
1111>Inner : () => void
1212>function () {} : () => void
1313
1414Outer.Inner.prototype = {
1515>Outer.Inner.prototype = { x: 1, m() { }} : { [x: string]: any; x: number; m(): void; }
1616>Outer.Inner.prototype : any
1717>Outer.Inner : () => void
18- >Outer : typeof Outer
18+ >Outer : { [x: string]: any; Inner(): void; }
1919>Inner : () => void
2020>prototype : any
2121>{ x: 1, m() { }} : { [x: string]: any; x: number; m(): void; }
@@ -48,7 +48,7 @@ var inno = new Outer.Inner()
4848>inno : { [x: string]: any; x: number; m(): void; }
4949>new Outer.Inner() : { [x: string]: any; x: number; m(): void; }
5050>Outer.Inner : () => void
51- >Outer : typeof Outer
51+ >Outer : { [x: string]: any; Inner(): void; }
5252>Inner : () => void
5353
5454inno.x
Original file line number Diff line number Diff line change 11=== tests/cases/conformance/salsa/def.js ===
22var Outer = {};
3- >Outer : typeof Outer
4- >{} : typeof Outer
3+ >Outer : { [x: string]: any; Inner: typeof Inner; }
4+ >{} : { [x: string]: any; Inner: typeof Inner; }
55
66=== tests/cases/conformance/salsa/a.js ===
77Outer.Inner = class {
88>Outer.Inner = class { constructor() { /** @type {number} */ this.y = 12 }} : typeof Inner
99>Outer.Inner : typeof Inner
10- >Outer : typeof Outer
10+ >Outer : { [x: string]: any; Inner: typeof Inner; }
1111>Inner : typeof Inner
1212>class { constructor() { /** @type {number} */ this.y = 12 }} : typeof Inner
1313
@@ -35,7 +35,7 @@ var inner = new Outer.Inner()
3535>inner : Inner
3636>new Outer.Inner() : Inner
3737>Outer.Inner : typeof Inner
38- >Outer : typeof Outer
38+ >Outer : { [x: string]: any; Inner: typeof Inner; }
3939>Inner : typeof Inner
4040
4141inner.y
@@ -57,7 +57,7 @@ var z = new Outer.Inner()
5757>z : Inner
5858>new Outer.Inner() : Inner
5959>Outer.Inner : typeof Inner
60- >Outer : typeof Outer
60+ >Outer : { [x: string]: any; Inner: typeof Inner; }
6161>Inner : typeof Inner
6262
6363z.y
You can’t perform that action at this time.
0 commit comments