We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f35430 commit 9ebe7c8Copy full SHA for 9ebe7c8
test/typeparam/issue48344.go
@@ -0,0 +1,26 @@
1
+// run -gcflags=-G=3
2
+
3
+// Copyright 2021 The Go Authors. All rights reserved.
4
+// Use of this source code is governed by a BSD-style
5
+// license that can be found in the LICENSE file.
6
7
+package main
8
9
+type G[T any] interface {
10
+ g()
11
+}
12
13
+type Foo[T any] struct {
14
15
16
+func (foo *Foo[T]) g() {
17
18
19
20
+func f[T any]() {
21
+ v := []G[T]{}
22
+ v = append(v, &Foo[T]{})
23
24
+func main() {
25
+ f[int]()
26
0 commit comments