diff options
author | Matthew Dempsky <mdempsky@google.com> | 2020-12-28 23:42:49 -0800 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2020-12-29 08:22:45 +0000 |
commit | 33801cdc627bc4d3f7128d1076a1ac249da2e015 (patch) | |
tree | 3e99cf079127c5aaf822a41c685c53096af6e240 /src/cmd/compile/internal/typecheck/func.go | |
parent | 82ad3083f86947eece2e4ce2ae82f1230aa466d9 (diff) | |
download | go-33801cdc627bc4d3f7128d1076a1ac249da2e015.tar.gz go-33801cdc627bc4d3f7128d1076a1ac249da2e015.zip |
[dev.regabi] cmd/compile: use Ntype where possible
For nodes that are always a type expression, we can use Ntype instead
of Node.
Passes toolstash -cmp.
Change-Id: I28f9fa235015ab48d0da06b78b30c49d74c64e3a
Reviewed-on: https://go-review.googlesource.com/c/go/+/280642
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/func.go')
-rw-r--r-- | src/cmd/compile/internal/typecheck/func.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/typecheck/func.go b/src/cmd/compile/internal/typecheck/func.go index c58fef10ec..9bb9245d4a 100644 --- a/src/cmd/compile/internal/typecheck/func.go +++ b/src/cmd/compile/internal/typecheck/func.go @@ -342,7 +342,7 @@ func tcClosure(clo *ir.ClosureExpr, top int) { fn.Iota = x } - fn.ClosureType = typecheck(fn.ClosureType, ctxType) + fn.ClosureType = typecheckNtype(fn.ClosureType) clo.SetType(fn.ClosureType.Type()) fn.SetClosureCalled(top&ctxCallee != 0) |