blob: c37b0f126783f6f0e3fc8ab5d0c088e9d96e0ecf [file] [log] [blame]
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package p
// The example from the issue.
type (
N /* ERROR illegal cycle */ [P any] M[P]
M[P any] N[P]
)
// A slightly more complicated case.
type (
A /* ERROR illegal cycle */ [P any] B[P]
B[P any] C[P]
C[P any] A[P]
)
// Confusing but valid (note that `type T *T` is valid).
type (
N1[P any] *M1[P]
M1[P any] *N1[P]
)