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

Groovyc is unable to compile a class which implements interface and uses @Delegate annotation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.1, 1.7.2
    • 1.7.4, 1.8-beta-1
    • Compiler
    • None
    • linux x86_64 - Fedora 12,
      Groovy 1.7.2 (also 1.7.1)
      Java 1.6.0_18 (64-bit)

    Description

      Groovy source file is attached.

      I am trying to compile this file with the command:
      groovy Temp.groovy

      Compiler's output is as follows:

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      Temp.groovy: 4: Can't have an abstract method in a non-abstract class. The class 'Temp' must be declared abstract or the method 'void run()' must be implemented.
      @ line 4, column 1.
      class Temp implements Runnable {
      ^

      1 error

      Attachments

        1. groovy4163_delegateWithImplementsC.patch
          7 kB
          Paul King
        2. Temp.groovy
          0.2 kB
          Pawel Dolega

        Activity

          People

            paulk Paul King
            pdolega Pawel Dolega
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: