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
value class regression trying to do lub/glb of typevar #8602
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8602?orig=1 |
@retronym said (edited on Apr 15, 2015 11:23:56 AM UTC): trait Matcher[X <: AnyRef] {}
object Problem2 {
def allOf[X](x: Matcher[_ >: X], y: Matcher[_ >: X]) = new Matcher[X]() {}
def allOf[X](x: Matcher[_ >: X]*) = new Matcher[X]() {}
}
object ProblemMaker {
def equalTo[X](x: X) = new Matcher[X]() {}
val b = Problem2.allOf(equalTo("f"), equalTo("g"))
}
|
The original example compiles now, although it's useless. We need to be able to infer case class Foo[CC[X], D <: CC[Int]](d: D, cc: CC[Int])
Foo(Nil, List(1, 2, 3)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to #5559 obviously but a regression from 2.10.
The text was updated successfully, but these errors were encountered: