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 Src[T any] func() Src[T]10 11func Seq[T any]() Src[T] {12 return nil13}14 15func Seq2[T1 any, T2 any](v1 T1, v2 T2) Src[T2] {16 return nil17}18 19func main() {20 // Type args fully supplied21 Seq[int]()22 // Partial inference of type args23 Seq2[int](5, "abc")24 // Full inference of type args25 Seq2(5, "abc")26}27 