a9dc6e07ad
Go 1.23 updates the go/types package to produce Alias type nodes for type aliases, unless disabled with gotypesalias=0. This new default behavior breaks codegen.LookupMethod, which uses checked type assertions to types.Named and types.Interface, as only named types and interfaces have methods. In this PR, we update codegen.LookupMethod to perform method lookup on the right-hand side of the alias declaration and clearly switch on the supported type nodes types. We also improve support for various edge cases, such as when an alias is used as a type parameter constraint, and add tests for the LookupMethod function. Additionally, we update cmd/viewer/tests to include types with aliases used in type fields and generic type constraints. Updates #13224 Updates #12912 Signed-off-by: Nick Khyl <nickk@tailscale.com> |
||
---|---|---|
.. | ||
addlicense | ||
build-webclient | ||
cloner | ||
connector-gen | ||
containerboot | ||
derper | ||
derpprobe | ||
dist | ||
get-authkey | ||
gitops-pusher | ||
hello | ||
k8s-nameserver | ||
k8s-operator | ||
mkmanifest | ||
mkpkg | ||
mkversion | ||
nardump | ||
natc | ||
netlogfmt | ||
nginx-auth | ||
pgproxy | ||
printdep | ||
proxy-to-grafana | ||
sniproxy | ||
speedtest | ||
ssh-auth-none-demo | ||
stunc | ||
stund | ||
stunstamp | ||
sync-containers | ||
systray | ||
tailscale | ||
tailscaled | ||
testcontrol | ||
testwrapper | ||
tl-longchain | ||
tsconnect | ||
tsidp | ||
tsshd | ||
tta | ||
viewer | ||
vnet | ||
xdpderper |