Debian Codegraph @

test/typeparam/issue48711.go

raw
1 // errorcheck
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 func f[T interface{ ~[]P }, P any](t T) { // ERROR "instantiation cycle"
10 if t == nil {
11 return
12 }
13 f[[]T, T]([]T{t})
14 }
15
16 func main() {
17 f[[]int](nil)
18 }