mirror of
https://github.com/golang/go
synced 2024-11-22 10:04:42 -07:00
cmd/compile: add missing Unalias call when writing type alias
Fixes #65778 Change-Id: I93af42967c7976d63b4f460b7ffbcb9a9c05ffe7 Reviewed-on: https://go-review.googlesource.com/c/go/+/565995 Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
This commit is contained in:
parent
4d923e3f07
commit
cda1e40b44
@ -831,7 +831,7 @@ func (w *writer) doObj(wext *writer, obj types2.Object) pkgbits.CodeObj {
|
||||
case *types2.TypeName:
|
||||
if obj.IsAlias() {
|
||||
w.pos(obj)
|
||||
w.typ(obj.Type())
|
||||
w.typ(types2.Unalias(obj.Type()))
|
||||
return pkgbits.ObjAlias
|
||||
}
|
||||
|
||||
|
13
test/fixedbugs/issue65778.go
Normal file
13
test/fixedbugs/issue65778.go
Normal file
@ -0,0 +1,13 @@
|
||||
// compile -godebug gotypesalias=1
|
||||
|
||||
// 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
|
||||
|
||||
type A = int
|
||||
|
||||
type T[P any] *A
|
||||
|
||||
var _ T[int]
|
Loading…
Reference in New Issue
Block a user