Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
I would like @Override to be allowed (and verified) on fields that implement an interface.
For instance, this is valid Groovy code:
interface Parent { String getSetting() } class Child implements Parent { final String setting ='my setting' }
I'd like to add the @Override to the field and have the compiler verify that it does override the getter in the parent. It should work on boolean getters too, I suppose.
Attachments
Issue Links
- relates to
-
GROOVY-4323 Convention for read-only properties
- Open
-
GROOVY-11231 TupleConstructor could copy annotations to constructor
- Open
-
GROOVY-5413 groovyc should emit errors when @Override is not respected
- Closed