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

Incorrect error implementing method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 2.0.6, 2.2.1
    • 2.3.0-rc-2
    • Compiler
    • 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

            melix Cédric Champeau
            mxm-groovy Maxim Medvedev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: