reflect.call: internal/abi: TFlagClosure, internal/lib/reflect: flagClosure.

This commit is contained in:
visualfc
2024-10-29 19:59:32 +08:00
parent 88c0e149b5
commit 6b0122547e
9 changed files with 442 additions and 8 deletions

View File

@@ -106,6 +106,9 @@ func (b Builder) MakeInterface(tinter Type, x Expr) (ret Expr) {
prog := b.Prog
typ := x.Type
tabi := b.abiType(typ.raw.Type)
if x.kind == vkClosure {
b.InlineCall(b.Pkg.rtFunc("SetClosure"), tabi)
}
kind, _, lvl := abi.DataKindOf(typ.raw.Type, 0, prog.is32Bits)
switch kind {
case abi.Indirect: