]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/noder: enable type aliases in type checker
authorMatthew Dempsky <mdempsky@google.com>
Wed, 15 May 2024 05:22:34 +0000 (22:22 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 15 May 2024 15:09:14 +0000 (15:09 +0000)
commit31c81500828993d99af3392742abde64194da858
tree4057627201089f1bc5179769b824a4698bdb5d28
parentc3c97ad1bf3ca5bac682df068f7e0384029839b1
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>
src/cmd/compile/internal/noder/irgen.go
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/noder/writer.go
test/alias2.go
test/fixedbugs/issue66873.go [new file with mode: 0644]