while (false) {
if (true) {
"hello".println();
} else {
"world".println()
}
}
or
for (num in Set {1,2}) {
if (true) {
"hello".println();
} else {
"world".println()
}
}
Both of these cause the parser to crash with the following exception:
java.lang.IllegalArgumentException: null was expected to be a StatementBlock, Statement or Expression but instead it is null
A normal parse problem is reported (correct behaviour) in the following situations:
if (false) {
if (true) {
"hello".println();
} else {
"world".println()
}
}
// or
while (false) {
if (true) {
"hello".println()
} else {
"world".println();
}
}
// or
if (true) {
"hello".println();
} else {
"world".println()
}