aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/testdata/fixedbugs
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-05-06 14:46:40 -0700
committerRobert Griesemer <gri@golang.org>2021-05-07 03:55:29 +0000
commitf5423ea615b94455e4f6b9cbee491b492bf2e1fe (patch)
treeb6b62cdfa4edbea65ff40f4cb2f04802db44c1d2 /src/cmd/compile/internal/types2/testdata/fixedbugs
parent832c70e33d8265116f0abce436215b8e9ee4bb08 (diff)
downloadgo-f5423ea615b94455e4f6b9cbee491b492bf2e1fe.tar.gz
go-f5423ea615b94455e4f6b9cbee491b492bf2e1fe.zip
cmd/compile/internal/types2: add test case for issue 45985
This is a port of https://golang.org/cl/317471. Updates #45985. Change-Id: I539d0fa6f9a77eb2fc169a21c5db9921f8eceb03 Reviewed-on: https://go-review.googlesource.com/c/go/+/317732 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/issue45985.go214
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/types2/testdata/fixedbugs/issue45985.go2 b/src/cmd/compile/internal/types2/testdata/fixedbugs/issue45985.go2
new file mode 100644
index 0000000000..7678e348ef
--- /dev/null
+++ b/src/cmd/compile/internal/types2/testdata/fixedbugs/issue45985.go2
@@ -0,0 +1,14 @@
+// Copyright 2021 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.
+
+package issue45985
+
+// TODO(gri): this error should be on app[int] below.
+func app[S /* ERROR "type S = S does not match" */ interface{ type []T }, T any](s S, e T) S {
+ return append(s, e)
+}
+
+func _() {
+ _ = app[int]
+}