ssa: makeInterface check funcdecl => closure

This commit is contained in:
visualfc
2024-08-15 10:03:34 +08:00
parent 9f1100b967
commit 2174d8fe8c
4 changed files with 692 additions and 238 deletions

View File

@@ -99,6 +99,10 @@ func (b Builder) MakeInterface(tinter Type, x Expr) (ret Expr) {
if debugInstr {
log.Printf("MakeInterface %v, %v\n", rawIntf, x.impl)
}
if x.kind == vkFuncDecl {
typ := b.Prog.Type(x.raw.Type, InGo)
x = checkExpr(x, typ.raw.Type, b)
}
prog := b.Prog
typ := x.Type
tabi := b.abiType(typ.raw.Type)