Scala Programming Language
  1. Scala Programming Language
  2. SI-5676

Experimental override object results in VerifyError

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.10.0-M3
    • Component/s: Misc Compiler
    • 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$;

        Issue Links

          Activity

          Hide
          Aleksandar Prokopec added a comment -

          Pending test in pending/run

          Show
          Aleksandar Prokopec added a comment - Pending test in pending/run
          Hide
          Hubert Plociniczak added a comment -

          Fixed in 18efdedfb97de7ca9f6

          Show
          Hubert Plociniczak added a comment - Fixed in 18efdedfb97de7ca9f6
          Hide
          Paul Phillips added a comment -

          I see I was marked as the reviewer which limits my right to complain, but since I missed it at the time – there's a big comment in that file explaining why it has to use rawflags to test for finality. This patch removed that test.

          Show
          Paul Phillips added a comment - I see I was marked as the reviewer which limits my right to complain, but since I missed it at the time – there's a big comment in that file explaining why it has to use rawflags to test for finality. This patch removed that test.
          Hide
          Hubert Plociniczak added a comment -

          I missed it, patch is on the way.

          Show
          Hubert Plociniczak added a comment - I missed it, patch is on the way.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development