]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: use f.Nname.Type() in makeABIWrapper
authorCherry Zhang <cherryyz@google.com>
Tue, 20 Apr 2021 21:29:57 +0000 (17:29 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 20 Apr 2021 21:59:20 +0000 (21:59 +0000)
Apparently, f.Nname.Ntype.Type() doesn't work with types2, as it
doesn't set Ntype, unlike the old type checker. f.Nname.Type()
works for both.

Change-Id: I6fa8a81c9fc7b65e008d9f158b88f0d56d84c3ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/312089
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/ssagen/abi.go

index 7d563623020a0b9bdc1df86ae5b83ec669078ca8..e460adaf95d143f2403f40a0ab0607a68ef2ffb1 100644 (file)
@@ -311,7 +311,7 @@ func makeABIWrapper(f *ir.Func, wrapperABI obj.ABI) {
 
        // At the moment we don't support wrapping a method, we'd need machinery
        // below to handle the receiver. Panic if we see this scenario.
-       ft := f.Nname.Ntype.Type()
+       ft := f.Nname.Type()
        if ft.NumRecvs() != 0 {
                panic("makeABIWrapper support for wrapping methods not implemented")
        }