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

            Hide
            prokopec Aleksandar Prokopec added a comment -

            Pending test in pending/run

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

            Fixed in 18efdedfb97de7ca9f6

            Show
            plocinic Hubert Plociniczak added a comment - Fixed in 18efdedfb97de7ca9f6
            Hide
            extempore 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
            extempore 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
            plocinic Hubert Plociniczak added a comment -

            I missed it, patch is on the way.

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

              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: