提交 cdb0352b 编写于 作者: 3 3dgen

修正类型断言返回类型错误

上级 acc3779a
......@@ -1102,7 +1102,7 @@ func (g *functionGenerator) genTypeAssert(inst *ssa.TypeAssert) (insts []wat.Ins
x := g.getValue(inst.X)
destType := g.tLib.compile(inst.AssertedType)
if inst.CommaOk {
ret_type = g.module.GenValueType_Tuple([]wir.ValueType{destType, g.module.I32})
ret_type = g.module.GenValueType_Tuple([]wir.ValueType{destType, g.module.BOOL})
} else {
ret_type = destType
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册