Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0-RC2
    • Fix Version/s: Scala 2.10.1
    • Component/s: None
    • Labels:
      None

      Description

      Exhibit #1:

      import language.dynamics
      
      object Foo extends Dynamic {
        def selectDynamic(name: String) = ???
        println(this.bar[Int])
      }
      
      [[syntax trees at end of                     typer]] // Test.scala
      package <empty> {
        import scala.language.dynamics;
        object Foo extends AnyRef with Dynamic {
          def <init>(): Foo.type = {
            Foo.super.<init>();
            ()
          };
          def selectDynamic(name: String): Nothing = scala.this.Predef.???;
          scala.this.Predef.println(this.selectDynamic("bar"))
        }
      }
      

      Exhibit #2:

      import language.dynamics
      
      object Foo extends Dynamic {
        def selectDynamic[T](name: String) = ???
        println(this.bar[Int])
      }
      
      [[syntax trees at end of                     typer]] // Test.scala
      package <empty> {
        import scala.language.dynamics;
        object Foo extends AnyRef with Dynamic {
          def <init>(): Foo.type = {
            Foo.super.<init>();
            ()
          };
          def selectDynamic[T >: Nothing <: Any](name: String): Nothing = scala.this.Predef.???;
          scala.this.Predef.println(this.selectDynamic[Nothing]("bar"))
        }
      }
      

        Activity

        Hide
        Paul Phillips added a comment -

        This needed a rewrite. Patch pending.

        Show
        Paul Phillips added a comment - This needed a rewrite. Patch pending.
        Show
        Paul Phillips added a comment - https://github.com/scala/scala/pull/1681

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development