Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7520

Improve unimplemented message for abstract methods

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.4
    • Fix Version/s: 2.4.5
    • Component/s: Compiler
    • Labels:
      None

      Description

      GROOVY-7081 caused the message to change for scenarios like

      abstract class Module {
          abstract String getModuleName()
      }
      class Master extends Module {
          String title
          String track
      }    
      def master = new Master(title: "Hello", track: "1")
      println master.title
      

      The message went from

      Can't have an abstract method in a non-abstract class. The class 'Master' must be declared abstract or the method 'java.lang.String getModuleName()' must be implemented.

      to

      Abstract method 'java.lang.String getModuleName()' is not implemented but a method of the same name but different return type is defined: method 'java.lang.String getModuleName()'

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keegan Keegan Witt
                Reporter:
                keegan Keegan Witt
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: