Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
I suggest to introduce a new AST transformation @InheritConstructors which can be placed on a class and the class with this annotation will inherit all the constructors of its super class.
For example:
class A { A() {} A(int arg) {} A(String arg) {} } @InheritConstructors class B extends A {}
Then class B will be equal to:
class B extends A { B() { super() } B(int arg) { super(arg) } B(String arg) { super(arg) } }
I think it is useful, especially for defining exceptions.