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

Overriding final causes verify error not compile error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.1
    • None
    • None
    • Ubuntu Edgy + JDK 1.6 + Groovy r 5589

    Description

      The code

      class Super { final x = [ ] }
      class Sub extends Super { final x ; Sub ( ) { x = super.x + [ 'a' ] } }
      

      causes the error:

      > groovy super.groovy
      Caught: java.lang.VerifyError: class Sub overrides final method getX.()Ljava/lang/Object;
      >

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            russel Dr. Russel Winder
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: