groovy
  1. groovy
  2. GROOVY-5011

@Override should be allowed (and verified) on properties that implement an interface

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Compiler
    • Labels:
      None
    • Number of attachments :
      0

      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.

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Hamlet D'Arcy
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: