codekingpro/portable-devtools
114k
1// run2 3// Copyright 2021 The Go Authors. All rights reserved.4// Use of this source code is governed by a BSD-style5// license that can be found in the LICENSE file.6 7package main8 9type G[T any] interface {10 g()11}12 13type Foo[T any] struct {14}15 16func (foo *Foo[T]) g() {17 18}19 20func f[T any]() {21 v := []G[T]{}22 v = append(v, &Foo[T]{})23}24func main() {25 f[int]()26}27 