Source file test/typeparam/issue51219.dir/a.go
1 // Copyright 2022 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 package a 6 7 // Type I is the first basic test for the issue, which relates to a type that is recursive 8 // via a type constraint. (In this test, I -> IConstraint -> MyStruct -> I.) 9 type JsonRaw []byte 10 11 type MyStruct struct { 12 x *I[JsonRaw] 13 } 14 15 type IConstraint interface { 16 JsonRaw | MyStruct 17 } 18 19 type I[T IConstraint] struct { 20 } 21