1
0
mirror of https://github.com/golang/go synced 2024-11-07 15:46:23 -07:00
go/test/typeparam/issue50259.go
Robert Griesemer 671e1150c6 go/types, types2: reorder object processing to avoid broken aliases
By processing non-alias type declarations before alias type declaration,
and those before everything else we can avoid some of the remaining
errors which are due to alias types not being available.

For #25838.
For #50259.
For #50276.
For #50729.

Change-Id: I233da2899a6d4954c239638624dfa8c08662e6b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/380056
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-01-24 21:27:33 +00:00

14 lines
249 B
Go

// compile -G=3
// Copyright 2022 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
var x T[B]
type T[_ any] struct{}
type A T[B]
type B = T[A]