Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
issue48617.go30 linesDownload Raw Back to typeparam
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 Foo[T any] interface {10	CreateBar() Bar[T]11}12 13type Bar[T any] func() Bar[T]14 15func (f Bar[T]) CreateBar() Bar[T] {16	return f17}18 19func abc[T any]() {20	var b Bar[T] = func() Bar[T] {21		var b Bar[T]22		return b23	}24	var _ Foo[T] = b()25}26 27func main() {28	abc[int]()29}30 
codekingpro/portable-devtools · Team Ai