Community
Participate
Working Groups
Hi, I found abnormal compile behavior. for example, ------------------------------------------------------------- Random r = new Random(); float before = r.nextFloat(); float after = r.nextFloat(); int i = 10; int index = (before < after) ? i - 1 : i; System.out.println(index + " index!"); ------------------------------------------------------------- Then, ------------------------------------------------------------- [iajc] error at int index = (before < after) ? i - 1 : i; [iajc] ^^^^^^^ [iajc] MainActivity.java:48:0::0 The operator << is undefined for the argument type(s) float, float [iajc] error at int index = (before < after) ? i - 1 : i; [iajc] [iajc] MainActivity.java:48:0::0 Synax error on token "<", << expected ------------------------------------------------------------- But, when I remove the both parenthesis from "(before < after) ? i - 1 : i" to "before < after ? i - 1 : i", I can compile successfully.
workaround is likely to change your names so they don't clash with aspectj keywords. One of the grammar patches where we modify JDT must not be using the right token identifier. Normally we allow it. I'll try to remember to take a look next time the parser is open for changes.