aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/testdata/fixedbugs
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-06-28 19:41:29 -0700
committerRobert Griesemer <gri@golang.org>2021-07-01 16:36:06 +0000
commit1cd505c353e4656ba28fd8de8708e8c8e6c21cbf (patch)
treedd270f3173bb962f457d44c341d05dde7047d3f7 /src/cmd/compile/internal/types2/testdata/fixedbugs
parent706c580ee1db800353752629882209ef6509a0b4 (diff)
downloadgo-1cd505c353e4656ba28fd8de8708e8c8e6c21cbf.tar.gz
go-1cd505c353e4656ba28fd8de8708e8c8e6c21cbf.zip
[dev.typeparams] cmd/compile/internal/types2: "comparable" must not be visible before Go 1.18
While at it, clean up the setup of comparable in universe.go. Fixes #46090 Change-Id: I9655b3e137a03763d677d9a2a730c5570ccff6dc Reviewed-on: https://go-review.googlesource.com/c/go/+/331517 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/testdata/fixedbugs')
-rw-r--r--src/cmd/compile/internal/types2/testdata/fixedbugs/issue46090.go29
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/types2/testdata/fixedbugs/issue46090.go2 b/src/cmd/compile/internal/types2/testdata/fixedbugs/issue46090.go2
new file mode 100644
index 0000000000..81b31974c8
--- /dev/null
+++ b/src/cmd/compile/internal/types2/testdata/fixedbugs/issue46090.go2
@@ -0,0 +1,9 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// The predeclared type comparable is not visible before Go 1.18.
+
+package go1_17
+
+type _ comparable // ERROR undeclared