Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selectDynamic swallows type parameters #6731

Closed
scabug opened this issue Nov 28, 2012 · 3 comments
Closed

selectDynamic swallows type parameters #6731

scabug opened this issue Nov 28, 2012 · 3 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Nov 28, 2012

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"))
  }
}
@scabug
Copy link
Author

scabug commented Nov 28, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6731?orig=1
Reporter: @xeno-by
Affected Versions: 2.10.0-RC2

@scabug
Copy link
Author

scabug commented Nov 28, 2012

@paulp said:
This needed a rewrite. Patch pending.

@scabug
Copy link
Author

scabug commented Nov 28, 2012

@paulp said:
scala/scala#1681

@scabug scabug closed this as completed Dec 5, 2012
@scabug scabug added this to the 2.10.1 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants