Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
issue53419.go29 linesDownload Raw Back to typeparam
1// run2 3// Copyright 2022 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 T1 struct{}10type T2 struct{}11type Both struct {12	T113	T214}15 16func (T1) m()   { panic("FAIL") }17func (T2) m()   { panic("FAIL") }18func (Both) m() {}19 20func f[T interface{ m() }](c T) {21	c.m()22}23 24func main() {25	var b Both26	b.m()27	f(b)28}29 
codekingpro/portable-devtools · Team Ai