summaryrefslogtreecommitdiffstats
path: root/test/typeparam/issue49547.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/typeparam/issue49547.go')
-rw-r--r--test/typeparam/issue49547.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/typeparam/issue49547.go b/test/typeparam/issue49547.go
new file mode 100644
index 0000000..6d359ba
--- /dev/null
+++ b/test/typeparam/issue49547.go
@@ -0,0 +1,22 @@
+// run
+
+// 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 main
+
+import "fmt"
+
+type foo int
+
+func main() {
+ want := "main.F[main.foo]"
+ got := fmt.Sprintf("%T", F[foo]{})
+ if got != want {
+ fmt.Printf("want: %s, got: %s\n", want, got)
+ }
+}
+
+type F[T any] struct {
+}