]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: set types properly for imported funcs with closures
authorDan Scales <danscales@google.com>
Sun, 11 Apr 2021 16:47:13 +0000 (09:47 -0700)
committerDan Scales <danscales@google.com>
Wed, 14 Apr 2021 01:28:16 +0000 (01:28 +0000)
commiteb433ed5a2ab13567cd5d7f0413308174750d5dd
tree46a288276cc027b310388eb3498e07cef9de024e
parent8dcc071063c0a9f020f0aafd51b7e0a17f0a0746
cmd/compile: set types properly for imported funcs with closures

For the new export/import of node types, we were just missing setting
the types of the closure variables (which have the same types as the
captured variables) and the OCLOSURE node itself (which has the same
type as the Func node).

Re-enabled inlining of functions with closures.

Change-Id: I687149b061f3ffeec3244ff02dc6e946659077a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/308974
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/inline/inl.go
src/cmd/compile/internal/typecheck/iimport.go
test/closure3.dir/main.go
test/inline.go