Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0
-
None
-
None
-
N/A
Description
When trying to use this() to call a constructor from another constructor, an exception is raised about the signatures of the call() method.
Groovy permits using default parameters in a constructor, which provides an alternative approach here, but it is not generally as good as cross-calling, as it can result in duplicated code.
e.g.
class A {
A (String a)
A ()
{ this("foo"); }}