mirror of
https://github.com/golang/go
synced 2024-11-02 13:42:29 +00:00
fb84e99eb7
gri@ reports that types2 now correctly handles when type parameters recursively refer back to the parameterized type, so we might as well add tests to exercise that. Unified IR also correctly handles importing and exporting these types, but -G=3 currently does not. Updates #46461. Change-Id: I272102aa08c40c980b9aeeca9f834291dfbbcc3e Reviewed-on: https://go-review.googlesource.com/c/go/+/348738 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
13 lines
268 B
Go
13 lines
268 B
Go
// compile -G=3
|
|
|
|
// 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
|
|
|
|
type T[U interface{ M() T[U] }] int
|
|
|
|
type X int
|
|
|
|
func (X) M() T[X] { return 0 }
|