The errormessages module of the compiler contained a method readableStringFrom(xs:Collection) using (connectingWord:String) with the following code:
if (count == 1) then {
if (xs.size > 2) then { result := result ++ "," }
result := result ++ " " connectingWord ++ " "
} elseif {
...
Notice that there is a missing ++ operator between " " and connectingWord.
This should be detected as a syntax error, but is not. Instead it is treated as two statements
result := result ++ " "
connectingWord ++ " "
the second of which causes the then branch to return a value (which is ignored), but does nothing.
The same syntax error in other contexts, such as block bodies and else branches, correctly raises a syntax error.
The root cause is that special-purpose code is being used to parse if(_)then(_)else(_).
The errormessages module of the compiler contained a method
readableStringFrom(xs:Collection) using (connectingWord:String)
with the following code:Notice that there is a missing
++
operator between" "
andconnectingWord
.This should be detected as a syntax error, but is not. Instead it is treated as two statements
the second of which causes the
then
branch to return a value (which is ignored), but does nothing. The same syntax error in other contexts, such as block bodies and else branches, correctly raises a syntax error.The root cause is that special-purpose code is being used to parse
if(_)then(_)else(_)
.