提交 a22efc2e 编写于 作者: S Skylot

fix: don't add cast for PHI insn (#1002)

上级 804c8eff
......@@ -509,6 +509,12 @@ public final class TypeInferenceVisitor extends AbstractVisitor {
private boolean insertAssignCast(MethodNode mth, SSAVar var, ArgType castType) {
RegisterArg assignArg = var.getAssign();
InsnNode assignInsn = assignArg.getParentInsn();
if (assignInsn == null) {
return false;
}
if (assignInsn.getType() == InsnType.PHI) {
return false;
}
BlockNode assignBlock = BlockUtils.getBlockByInsn(mth, assignInsn);
if (assignBlock == null) {
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册