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
Duplicate method signatures in specialized code #8431
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8431?orig=1 |
@adriaanm said: |
@adriaanm said (edited on Mar 19, 2014 11:49:51 PM UTC): g bisect start
g bisect good v2.10.2
g bisect bad v2.10.3
g bisect run scala-run-head /Users/adriaan/Desktop/Bugs/t8431.scala 504b5f3b157de639633c962ea21f7e89152da77f is the first bad commit
commit 504b5f3b157de639633c962ea21f7e89152da77f
Author: Vlad Ureche <vlad.ureche@gmail.com>
Date: Mon Jul 8 13:32:40 2013 +0200
SI-7638 Superaccessor lookup after specialization
...
I mean "regression" as in change in behavior. The above patch may very well be correct and an improvement (it compiles!), but likely revealed mixins was not prepared with the corner case in this ticket. # scala-run-head
#!/bin/bash
rev=$(git rev-parse HEAD)
tmpBisect="$(mktemp -d -t bisect)"
cd "$tmpBisect" && RUNNER=scalac scala-hash $rev $@ || exit 0 # ignore compiler errors, which muddy the waters further in this case
scala-hash $rev Test |
@retronym said: import scala.{ specialized => spec }
trait EqProductFoo[@spec(Int) A] {
def eqv(x0: A): Boolean = eqvEqProductFoo(x0)
protected def eqvEqProductFoo(x0: A) = ???
}
trait OrderProductFoo[@spec(Int) A] extends EqProductFoo[A] {
override def eqv(x0: A): Boolean = eqvEqProductFoo(x0)
}
object Bar {
def OrderProduct2[@spec(Int) A]: EqProductFoo[A] = {
new OrderProductFoo[A] { }
}
OrderProduct2[Int]
}
object Test extends App {
Bar
} |
@retronym said: import scala.{ specialized => spec }
trait EqProductFoo[@spec(Int) A] {
def eqv(x0: A): Boolean = ???
}
trait OrderProductFoo[@spec(Int) A] extends EqProductFoo[A] {
override def eqv(x0: A): Boolean = super.eqv(x0)
}
class C extends OrderProductFoo[Int]
object Test {
def main(args: Array[String]) {
new C
}
} |
@gkossakowski said: |
@retronym said: |
Extracted from spire:
This compiles and runs fine with Scala 2.10.2 but fails with Scala 2.11.0-RC1:
The text was updated successfully, but these errors were encountered: