>=
This commit is contained in:
@@ -138,6 +138,9 @@ public abstract class StackValue {
|
||||
else if (opToken == JetTokens.GT) {
|
||||
opcode = jumpIfFalse ? Opcodes.IF_ICMPLE : Opcodes.IF_ICMPGT;
|
||||
}
|
||||
else if (opToken == JetTokens.GTEQ) {
|
||||
opcode = jumpIfFalse ? Opcodes.IF_ICMPLT : Opcodes.IF_ICMPGE;
|
||||
}
|
||||
else if (opToken == JetTokens.LT) {
|
||||
opcode = jumpIfFalse ? Opcodes.IF_ICMPGE : Opcodes.IF_ICMPLT;
|
||||
}
|
||||
|
||||
@@ -185,6 +185,11 @@ public class NamespaceGenTest extends LightCodeInsightFixtureTestCase {
|
||||
binOpTest("fun foo(a: Int, b: Int): Int = if (a != b) 1 else 0", 5, 3, 1);
|
||||
}
|
||||
|
||||
public void testGE() throws Exception {
|
||||
binOpTest("fun foo(a: Int, b: Int): Int = if (a >= b) 1 else 0", 5, 5, 1);
|
||||
binOpTest("fun foo(a: Int, b: Int): Int = if (a >= b) 1 else 0", 3, 5, 0);
|
||||
}
|
||||
|
||||
public void testIfNoElse() throws Exception {
|
||||
loadFile("ifNoElse.jet");
|
||||
System.out.println(generateToText());
|
||||
|
||||
Reference in New Issue
Block a user