Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-5676

Experimental override object results in VerifyError

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.10.0-M3
    • Component/s: Compiler (Misc)
    • Environment:

      Scala compiler version 2.10.0-20120410-064245-00e9446bfc
      Scala compiler version 2.10.0-M2
      java version "1.6.0_22"

      Description

      Positive test
      test/files/pos/override-object-yes.scala
      compiles but doesn't load:

      package case2 {
        class Bar[T]
       
        class Foo[T] {
          object A extends Bar[T]
        }
       
        class Baz[S] extends Foo[S] {
          override object A extends Bar[S]
        }
        object Test {
          def main(a: Array[String]) {
            val b = new Baz[Any]
            println(b)
          }
        }
      }
      

      results in VerifyError because the object accessor is final:
      java.lang.VerifyError: class case2.Baz overrides final method A.()Lcase2/Foo$A$;

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                plocinic Hubert Plociniczak
                Reporter:
                apm A. P. Marki
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: