Skip to content

Commit b33d372

Browse files
authored
Don't set parent on non-transient symbols in mergeSymbolTable (#61560)
1 parent dba6c9b commit b33d372

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2840,7 +2840,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
28402840
// When merging the module augmentation into a.ts, the symbol for `A` will itself be merged, so its parent
28412841
// should be the merged module symbol. But the symbol for `B` has only one declaration, so its parent should
28422842
// be the module augmentation symbol, which contains its only declaration.
2843-
merged.parent = mergedParent;
2843+
if (merged.flags & SymbolFlags.Transient) {
2844+
merged.parent = mergedParent;
2845+
}
28442846
}
28452847
target.set(id, merged);
28462848
});

0 commit comments

Comments
 (0)