Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-beta-3
-
Component/s: None
-
Labels:None
-
Environment:Windows
-
Number of attachments :
Description
In the following code, the first line results in a call to MyClass.toString, but the second doesn't.
Notice that the only difference is whether parentheses are used.
println(new MyClass(a:1))
println new MyClass(a:2)
class MyClass {
a
String toString() { "a = $
" }
}
Test case added to src/test/groovy/bugs/PrintlnWithNewBug.groovy