Skip to content

Commit 94ae2f2

Browse files
authored
Port "Stop reassigning .valueDeclaration to avoid replacing earlier declarations with late ones" (#1813)
1 parent 6b181df commit 94ae2f2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

internal/checker/checker.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15400,9 +15400,7 @@ func (c *Checker) addDeclarationToLateBoundSymbol(symbol *ast.Symbol, member *as
1540015400
symbol.Declarations = append(symbol.Declarations, member)
1540115401
}
1540215402
if symbolFlags&ast.SymbolFlagsValue != 0 {
15403-
if symbol.ValueDeclaration == nil || symbol.ValueDeclaration.Kind != member.Kind {
15404-
symbol.ValueDeclaration = member
15405-
}
15403+
binder.SetValueDeclaration(symbol, member)
1540615404
}
1540715405
}
1540815406

0 commit comments

Comments
 (0)