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

An interface implementation (override) with a method including a default parameter value does not compile

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.6
    • 2.4.6
    • Compiler
    • None
    • JDK 1.7.0_60

    Description

      A complete (gradle based) project to demonstrate the problem has been provided at https://github.com/MartinAhrer/bug-groovy-2.3-override.

      interface TemplatedInterface<T> {
          T execute(Map argument)
      }
      class TemplatedInterfaceImplementation implements TemplatedInterface<String>{
          // This won't compile with groovy 2.3.x when adding a default argument value
          @Override
          String execute(Map argument = [:]) {
              return null
          }
      }
      

      This kind of relates to GROOVY-6654.

      Attachments

        Activity

          People

            shils Shil Sinha
            martinahrer Martin Ahrer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: