core: fix sythetic constructor replacement (#334)

This commit is contained in:
Skylot
2018-08-16 23:30:53 +03:00
parent 6cb14a1c50
commit f9e7a29c08
3 changed files with 78 additions and 33 deletions
@@ -396,14 +396,14 @@ public class ModVisitor extends AbstractVisitor {
return filledArr;
}
private static boolean allArgsNull(InsnNode insn) {
private static boolean allArgsNull(ConstructorInsn insn) {
for (InsnArg insnArg : insn.getArguments()) {
if (insnArg.isLiteral()) {
LiteralArg lit = (LiteralArg) insnArg;
if (lit.getLiteral() != 0) {
return false;
}
} else if (!insnArg.isThis()) {
} else {
return false;
}
}