From 209ed1a9c75d17046285c416b74a14bb89799757 Mon Sep 17 00:00:00 2001 From: Tim King Date: Fri, 9 Aug 2024 10:50:00 -0700 Subject: [PATCH] cmd/compile/internal/importer: enable aliases Flips the pkgReader.enableAlias flag to true when reading unified IR. This was disabled while resolving #66873. This resolves the TODO to flip it back to true. Updates #66873 Updates #68778 Change-Id: Ifd52b0f9510d6bcf151de1c9a18d71ab548c14e4 Reviewed-on: https://go-review.googlesource.com/c/go/+/604099 LUCI-TryBot-Result: Go LUCI Reviewed-by: David Chase --- src/cmd/compile/internal/importer/ureader.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/cmd/compile/internal/importer/ureader.go b/src/cmd/compile/internal/importer/ureader.go index d3c7d4516f7ee8..e8d3e20cee969a 100644 --- a/src/cmd/compile/internal/importer/ureader.go +++ b/src/cmd/compile/internal/importer/ureader.go @@ -28,11 +28,9 @@ func ReadPackage(ctxt *types2.Context, imports map[string]*types2.Package, input pr := pkgReader{ PkgDecoder: input, - ctxt: ctxt, - imports: imports, - // Currently, the compiler panics when using Alias types. - // TODO(gri) set to true once this is fixed (issue #66873) - enableAlias: false, + ctxt: ctxt, + imports: imports, + enableAlias: true, posBases: make([]*syntax.PosBase, input.NumElems(pkgbits.RelocPosBase)), pkgs: make([]*types2.Package, input.NumElems(pkgbits.RelocPkg)),