Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-5
-
None
-
None
-
jdk1.4.2_02, WinXP, Groovy from CVS
Description
Consider the following snippet:
arg = "test"
content = "${arg} ="
if (arg != "something")
{
content += "?"
}
content += "= ${arg}."
println content
This does result in the following output:
test =?test= .
The expression in the string added to 'content' was expanded at the beginning of the string.
Strangely this does seem to have something to do with the if statement above it. If the string to which arg is compared to, is changed from "something" to "test", than the output is correct (i.e. test == test.)