Debian Codegraph @

src/internal/types/testdata/fixedbugs/issue75883.go

raw
1 // Copyright 2025 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Test cases that were invalid because of cycles before the respective language change.
6 // Some are still invalid, but not because of cycles.
7
8 package p
9
10 type T1[P T1[P]] struct{}
11 type T2[P interface {
12 T2[int /* ERROR "int does not satisfy interface{T2[int]}" */]
13 }] struct{}
14 type T3[P interface {
15 m(T3[int /* ERROR "int does not satisfy interface{m(T3[int])}" */])
16 }] struct{}
17 type T4[P T5[P /* ERROR "P does not satisfy T4[P]" */]] struct{}
18 type T5[P T4[P /* ERROR "P does not satisfy T5[P]" */]] struct{}
19
20 type T6[P int] struct{ f *T6[P] }