test: another deboxing issue

This commit is contained in:
Skylot
2019-07-28 21:09:56 +03:00
parent e842e022ba
commit 8d68d409eb
3 changed files with 57 additions and 1 deletions
@@ -98,13 +98,20 @@ public class DeboxingVisitor extends AbstractVisitor {
arg.add(AFlag.EXPLICIT_PRIMITIVE_TYPE);
}
arg.setType(primitiveType);
boolean forbidInline;
if (canChangeTypeToPrimitive(resArg)) {
resArg.setType(primitiveType);
forbidInline = false;
} else {
forbidInline = true;
}
InsnNode constInsn = new InsnNode(InsnType.CONST, 1);
constInsn.addArg(arg);
constInsn.setResult(resArg);
if (forbidInline) {
constInsn.add(AFlag.DONT_INLINE);
}
return constInsn;
}
}