diff --git a/src/main/java/de/maishai/typedast/typedclass/TypedBinary.java b/src/main/java/de/maishai/typedast/typedclass/TypedBinary.java index 5f94d76..530c6f6 100644 --- a/src/main/java/de/maishai/typedast/typedclass/TypedBinary.java +++ b/src/main/java/de/maishai/typedast/typedclass/TypedBinary.java @@ -3,17 +3,14 @@ package de.maishai.typedast.typedclass; import de.maishai.ast.Operator; import de.maishai.ast.records.Binary; import de.maishai.typedast.MethodContext; -import de.maishai.typedast.TypedExpression; import de.maishai.typedast.Type; +import de.maishai.typedast.TypedExpression; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.objectweb.asm.Label; -import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; -import java.util.Map; - import static de.maishai.typedast.Help.TypedExpressionHelp.convertExpression; @Data @@ -78,9 +75,9 @@ public class TypedBinary implements TypedExpression { Label returnTrue = new Label(); Label returnFalse = new Label(); left.codeGen(ctx); - ctx.getMv().visitJumpInsn(Opcodes.IFNE, returnFalse); + ctx.getMv().visitJumpInsn(Opcodes.IFEQ, returnFalse); right.codeGen(ctx); - ctx.getMv().visitJumpInsn(Opcodes.IFNE, returnFalse); + ctx.getMv().visitJumpInsn(Opcodes.IFEQ, returnFalse); ctx.getMv().visitJumpInsn(Opcodes.GOTO, returnTrue); ctx.getMv().visitLabel(returnFalse);