result: checkExpr funcPtr => closure

This commit is contained in:
visualfc
2024-05-06 19:42:18 +08:00
parent c60be43ac6
commit c2767be178
5 changed files with 170 additions and 1 deletions

View File

@@ -573,6 +573,9 @@ func (p *context) compileInstrOrValue(b llssa.Builder, iv instrOrValue, asValue
x := p.compileValue(b, v.X)
t := p.prog.Type(v.AssertedType, llssa.InGo)
ret = b.TypeAssert(x, t, v.CommaOk)
case *ssa.Extract:
x := p.compileValue(b, v.Tuple)
ret = b.Extract(x, v.Index)
default:
panic(fmt.Sprintf("compileInstrAndValue: unknown instr - %T\n", iv))
}