-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/types/objectpath: support parameterized type aliases
This change caused objectpath to treat Alias nodes more like Named types: as first-class nodes, with type parameters, and a destructuring operation (Alias.Rhs(), opRhs, encoded 'a') access the RHS type. A number of historical bugs made this trickier than it should have been: - go1.22 prints Alias wrongly, requiring a workaround in the test. - aliases.Enabled is too expensive to call in the decoder, so we must trust that when we see an opRhs and we don't have an alias, it's because !Enabled(), not a bug. - legacy aliases still need to be handled, and order matters. - the test of parameterized aliases can't be added until the GOEXPERIMENT has gone away (soon). Updates golang/go#46477 Change-Id: Ia903f81e29fb7dbb6e17d1e6a962fad73b3e1f7b Reviewed-on: https://go-review.googlesource.com/c/tools/+/601235 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Alan Donovan <[email protected]> Reviewed-by: Tim King <[email protected]> Commit-Queue: Alan Donovan <[email protected]>
- Loading branch information
Showing
5 changed files
with
94 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters