mirror of
https://github.com/golang/go
synced 2024-09-29 13:34:30 -06:00
go/types, types2: don't print aliased type (in comments) for Alias types
Fixes #64584. Change-Id: I756d6026d10f130c1dd5026891b7cc3c640d7f78 Reviewed-on: https://go-review.googlesource.com/c/go/+/548135 Reviewed-by: Alan Donovan <adonovan@google.com> Run-TryBot: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
This commit is contained in:
parent
2b4425759c
commit
5e724ccb2b
@ -998,7 +998,7 @@ type S struct{ A }
|
||||
}
|
||||
|
||||
got := S.String()
|
||||
const want = "type p.S struct{p.A /* = []int */}"
|
||||
const want = "type p.S struct{p.A}"
|
||||
if got != want {
|
||||
t.Fatalf("got %q; want %q", got, want)
|
||||
}
|
||||
|
@ -331,8 +331,6 @@ func (w *typeWriter) typ(typ Type) {
|
||||
if w.ctxt != nil {
|
||||
// TODO(gri) do we need to print the alias type name, too?
|
||||
w.typ(Unalias(t.obj.typ))
|
||||
} else {
|
||||
w.string(fmt.Sprintf(" /* = %s */", Unalias(t.obj.typ)))
|
||||
}
|
||||
|
||||
default:
|
||||
|
@ -1008,7 +1008,7 @@ type S struct{ A }
|
||||
}
|
||||
|
||||
got := S.String()
|
||||
const want = "type p.S struct{p.A /* = []int */}"
|
||||
const want = "type p.S struct{p.A}"
|
||||
if got != want {
|
||||
t.Fatalf("got %q; want %q", got, want)
|
||||
}
|
||||
|
@ -334,8 +334,6 @@ func (w *typeWriter) typ(typ Type) {
|
||||
if w.ctxt != nil {
|
||||
// TODO(gri) do we need to print the alias type name, too?
|
||||
w.typ(Unalias(t.obj.typ))
|
||||
} else {
|
||||
w.string(fmt.Sprintf(" /* = %s */", Unalias(t.obj.typ)))
|
||||
}
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user