That's a good one... Janino forgot to parse the semicolon at
the end of the expression statement. ("somemethod();" is an
expression statement.) Thus, it parses the semicolon as an
extra "empty statement". The only difference that this makes
is that we now have TWO statements. Your statement
if (x==y)
somemethod();
else {
somemethod();
somemethod();
}
is thus parsed as
if (x==y)
somemethod()
;
else // <= "else" without "if".
Will release the fix tonight as version 1.0.3.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=865893
That's a good one... Janino forgot to parse the semicolon at
the end of the expression statement. ("somemethod();" is an
expression statement.) Thus, it parses the semicolon as an
extra "empty statement". The only difference that this makes
is that we now have TWO statements. Your statement
if (x==y)
somemethod();
else {
somemethod();
somemethod();
}
is thus parsed as
if (x==y)
somemethod()
;
else // <= "else" without "if".
Will release the fix tonight as version 1.0.3.