Skip to content

Commit b9bed91

Browse files
authored
Get merged symbol after resolving indirection alias (#2266)
1 parent a568e20 commit b9bed91

File tree

5 files changed

+5
-23
lines changed

5 files changed

+5
-23
lines changed

internal/checker/checker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15800,7 +15800,7 @@ func (c *Checker) resolveAlias(symbol *ast.Symbol) *ast.Symbol {
1580015800
}
1580115801

1580215802
func (c *Checker) resolveIndirectionAlias(source *ast.Symbol, target *ast.Symbol) *ast.Symbol {
15803-
result := c.resolveAlias(target)
15803+
result := c.getMergedSymbol(c.resolveAlias(target))
1580415804
if targetLinks := c.aliasSymbolLinks.Get(target); targetLinks.typeOnlyDeclaration != nil {
1580515805
if sourceLinks := c.aliasSymbolLinks.Get(source); sourceLinks.typeOnlyDeclaration == nil {
1580615806
sourceLinks.typeOnlyDeclaration = targetLinks.typeOnlyDeclaration

testdata/baselines/reference/submodule/conformance/umd-augmentation-3.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var t = p.x;
4848

4949
=== node_modules/math2d/index.d.ts ===
5050
export as namespace Math2d;
51-
>Math2d : typeof import("node_modules/math2d/index")
51+
>Math2d : typeof import("node_modules/math2d/index.d.ts")
5252

5353
export = M2D;
5454
>M2D : typeof import("node_modules/math2d/index.d.ts")

testdata/baselines/reference/submodule/conformance/umd-augmentation-3.types.diff

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,7 @@
1212

1313
var t = p.x;
1414
>t : number
15-
@@= skipped -12, +12 lines =@@
16-
17-
=== node_modules/math2d/index.d.ts ===
18-
export as namespace Math2d;
19-
->Math2d : typeof import("node_modules/math2d/index.d.ts")
20-
+>Math2d : typeof import("node_modules/math2d/index")
21-
22-
export = M2D;
23-
>M2D : typeof import("node_modules/math2d/index.d.ts")
24-
@@= skipped -53, +53 lines =@@
15+
@@= skipped -65, +65 lines =@@
2516
// Add a method to the class
2617
interface Vector {
2718
reverse(): Math2d.Point;

testdata/baselines/reference/submodule/conformance/umd-augmentation-4.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var t = p.x;
4646

4747
=== node_modules/math2d/index.d.ts ===
4848
export as namespace Math2d;
49-
>Math2d : typeof import("node_modules/math2d/index")
49+
>Math2d : typeof import("node_modules/math2d/index.d.ts")
5050

5151
export = M2D;
5252
>M2D : typeof import("node_modules/math2d/index.d.ts")

testdata/baselines/reference/submodule/conformance/umd-augmentation-4.types.diff

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
--- old.umd-augmentation-4.types
22
+++ new.umd-augmentation-4.types
3-
@@= skipped -45, +45 lines =@@
4-
5-
=== node_modules/math2d/index.d.ts ===
6-
export as namespace Math2d;
7-
->Math2d : typeof import("node_modules/math2d/index.d.ts")
8-
+>Math2d : typeof import("node_modules/math2d/index")
9-
10-
export = M2D;
11-
>M2D : typeof import("node_modules/math2d/index.d.ts")
12-
@@= skipped -53, +53 lines =@@
3+
@@= skipped -98, +98 lines =@@
134
// Add a method to the class
145
interface Vector {
156
reverse(): Math2d.Point;

0 commit comments

Comments
 (0)