diff options
author | Robert Griesemer <gri@golang.org> | 2021-07-27 19:13:26 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-07-29 19:45:02 +0000 |
commit | ff0c0dbca6a7a3a3d6528481829679be4c9d7e94 (patch) | |
tree | f1a8f548ddcfdbb13d0af7811f0efca53709f8f3 /src/cmd/compile/internal/types2/testdata | |
parent | 2fa8f00915893670964e05e14be7202f6f97760b (diff) | |
download | go-ff0c0dbca6a7a3a3d6528481829679be4c9d7e94.tar.gz go-ff0c0dbca6a7a3a3d6528481829679be4c9d7e94.zip |
[dev.typeparams] cmd/compile/internal/types2: use type terms to represent unions
This is just an internal representation change for now.
Change-Id: I7e0126e9b17850ec020c2a60db13582761557bea
Reviewed-on: https://go-review.googlesource.com/c/go/+/338092
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/testdata')
-rw-r--r-- | src/cmd/compile/internal/types2/testdata/examples/constraints.go2 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/types2/testdata/examples/constraints.go2 b/src/cmd/compile/internal/types2/testdata/examples/constraints.go2 index d9805fe694..28aa19bb12 100644 --- a/src/cmd/compile/internal/types2/testdata/examples/constraints.go2 +++ b/src/cmd/compile/internal/types2/testdata/examples/constraints.go2 @@ -31,9 +31,9 @@ type ( _ interface{int|~ /* ERROR duplicate term int */ int } _ interface{~int|~ /* ERROR duplicate term int */ int } - // For now we do not permit interfaces with ~ or in unions. - _ interface{~ /* ERROR cannot use interface */ interface{}} - _ interface{int|interface /* ERROR cannot use interface */ {}} + // For now we do not permit interfaces with methods in unions. + _ interface{~ /* ERROR invalid use of ~ */ interface{}} + _ interface{int|interface /* ERROR cannot use .* in union */ { m() }} ) type ( |