]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile/internal/noder: stop creating TUNION types
authorMatthew Dempsky <mdempsky@google.com>
Fri, 2 Dec 2022 01:24:23 +0000 (17:24 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 26 Jan 2023 21:43:08 +0000 (21:43 +0000)
commita7de684e1b6f460aae7d4dbf2568cb21130ec520
tree6514c72108634488a7ee3aab15ef8b08fa764838
parent627f12868c4c3e714bbb4ce4a418f918c1935dc2
cmd/compile/internal/noder: stop creating TUNION types

In the types1 universe under the unified frontend, we never need to
worry about type parameter constraints, so we only see pure
interfaces. However, we might still see interfaces that contain union
types, because of interfaces like "interface{ any | int }" (equivalent
to just "any").

We can handle these without needing to actually represent type unions
within types1 by simply mapping any union to "any".

Updates #57410.

Change-Id: I5e4efcf0339edbb01f4035c54fb6fb1f9ddc0c65
Reviewed-on: https://go-review.googlesource.com/c/go/+/458619
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/noder/reader.go
test/typeparam/issue52124.go