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

Incorrect error implementing method

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.0.6, 2.2.1
    • Fix Version/s: 2.3.0-rc-2
    • Component/s: Compiler
    • Labels:
      None

      Description

      Groovyc fails to compile the following code:

      abstract  class Base<A> {
          abstract  void foo(A[] a) 
      }
      
      class X {}
      
      class Inheritor extends Base<X>{
          @Override
          void foo(X[] a) {} 
      //Groovyc: Can't have an abstract method in a non-abstract class. 
      //The class 'B' must be declared abstract 
      //or the method 'void foo([Ljava.lang.Object;)' must be implemented.
      }
      
      

        Attachments

          Activity

            People

            • Assignee:
              melix C├ędric Champeau
              Reporter:
              mxm-groovy Maxim Medvedev
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: