mirror of https://github.com/golang/go.git
cmd/compile/internal/gc: properly initialize ssa.Func Type field
The ssa.Func has Type field that is described as function signature type. It never gets any value and remains nil. This leads to "<T>" signature printed representation. Given this function declaration: func foo(x int, f func() string) (int, error) GOSSAFUNC printed it as below: compiling foo foo <T> After this change: compiling foo foo func(int, func() string) (int, error) Change-Id: Iec5eec8aac5c76ff184659e30f41b2f5fe86d329 Reviewed-on: https://go-review.googlesource.com/102375 Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
ea668e18a6
commit
3afd2d7fc8
|
|
@ -110,6 +110,7 @@ func buildssa(fn *Node, worker int) *ssa.Func {
|
|||
|
||||
s.f = ssa.NewFunc(&fe)
|
||||
s.config = ssaConfig
|
||||
s.f.Type = fn.Type
|
||||
s.f.Config = ssaConfig
|
||||
s.f.Cache = &ssaCaches[worker]
|
||||
s.f.Cache.Reset()
|
||||
|
|
|
|||
Loading…
Reference in New Issue