Menu

#652 for a empty if-stmt, else-stmt will not be executed

patched
closed-duplicate
emitter (227)
5
2002-08-22
2002-08-22
Anonymous
No

// Jikes Compiler - Version 1.16 - 10 July 2002
// file: jikes-1.16-windows.zip
// platform:
// window nt 4.0 servicepack 5
// java version "1.3.1_02"
// Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
// Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)
// Full Error Message:: none, is a runtime error
// Testcase: see class Test

public class Test {
public static void main(String[] args) {

boolean val = false;

if (val) {
System.out.println("val is true");
}
else {
System.out.println("val is false");
}

if (val) {
;
}
else {
// this part will not be executed
System.out.println("val is false");
}

System.exit(0);
}
}

Discussion

  • Eric Blake

    Eric Blake - 2002-08-22

    Duplicate.

     
  • Eric Blake

    Eric Blake - 2002-08-22
    • labels: 105 --> emitter
    • assigned_to: nobody --> ebblake
    • status: open --> closed-duplicate
     

Log in to post a comment.

MongoDB Logo MongoDB