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

early definitions do not honor final semantics

    Details

      Description

      b1 is typed as String("def"), b0 is typed as String.

      class Foo extends {
        final val b0 = "abc"
      } with AnyRef {
        final val b1 = "def"
      }
      
      package <empty> {
        class Foo extends scala.AnyRef {
          final private[this] val b0: String = _;
          final <stable> <accessor> def b0: String = Foo.this.b0;
          def <init>(): Foo = {
            val b0: String = "abc";
            Foo.super.<init>();
            ()
          };
          final private[this] val b1: String("def") = "def";
          final <stable> <accessor> def b1: String = "def"
        }
      }
      

        Activity

        Show
        Paul Phillips added a comment - https://github.com/scala/scala/pull/1749
        Hide
        Adriaan Moors added a comment -

        reopening for 2.10.1-RC1 backport

        Show
        Adriaan Moors added a comment - reopening for 2.10.1-RC1 backport

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development