Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4.0-beta-2
-
None
-
None
Description
@Newify works fine with parenthesis, also without parenthesis for number parameter, but not for String. Please see the example below.
class MyClass { MyClass(int value) {} MyClass(String value) {} } @Newify(MyClass) def create1() { MyClass(1) //OK } @Newify(MyClass) def create2() { MyClass('hello') //OK } @Newify(MyClass) def create3() { MyClass 1 //OK } @Newify(MyClass) def create4() { MyClass 'hello' //ERROR } println create1() println create2() println create3() println create4()