1
0
mirror of https://github.com/golang/go synced 2024-11-23 00:00:07 -07:00
go/test/fixedbugs/issue66873.go
Matthew Dempsky 31c8150082 cmd/compile/internal/noder: enable type aliases in type checker
This CL fixes an initialization loop during IR construction, that
stems from IR lacking first-class support for aliases. As a
workaround, we avoid publishing alias declarations until the RHS type
expression has been constructed.

Thanks to gri@ for investigating while I was out.

Fixes #66873.

Change-Id: I11e0d96ea6c357c295da47f44b6ec408edef89b7
Reviewed-on: https://go-review.googlesource.com/c/go/+/585399
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
2024-05-15 15:09:14 +00:00

16 lines
237 B
Go

// compile
// Copyright 2024 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
func f(A) {}
type T int
type A = T
func (A) m() {}