go/test/typeparam/issue48306.dir/a.go
Robert Griesemer cc14fcac2b cmd/compile/internal/types2: disallow type cycles through type parameter lists
If we reach a generic type that is part of a cycle
and we are in a type parameter list, we have a cycle
through a type parameter list, which is invalid.

Fixes #49439.

Change-Id: Ia6cf97e1748ca0c0e61c02841202050091365b0b
Reviewed-on: https://go-review.googlesource.com/c/go/+/361922
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-11-10 00:56:09 +00:00

10 lines
206 B
Go

// 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 a
type I[T any] interface {
F() T
}