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

Improve unimplemented message for abstract methods

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.4
    • 2.4.5
    • Compiler
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: