Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-2
-
Fix Version/s: 1.0-beta-3
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Groovy Strings don't support +=
For example, this doesn't work:
a = "dog"
b = "$
b += " cat"
Instead, toString() must be called on the GString first:
a = "dog"
b = "${a}
".toString()
b += " cat"
Fixed. Both groovy.lang.GStringTest and src/test/groovy/GStringTest.groovy demonstrate it in action