You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
0 commit comments