Skip to content

Compiler hangs on implicit search with union of intersection of singleton types #864

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

Closed
smarter opened this issue Oct 25, 2015 · 0 comments

Comments

@smarter
Copy link
Member

smarter commented Oct 25, 2015

This is a more general case than #830 which was fixed in #843

object C {
  val a: Int = 1
  val b: Int = 2
  val c: Int = 2

  trait X[T]
  implicit def u[A, B]: X[A | B] = new X[A | B] {}
  def y[T](implicit x: X[T]): T = ???
  val x: a.type & b.type | b.type & c.type = y
}
odersky added a commit to dotty-staging/dotty that referenced this issue Feb 4, 2016
provided !(a.type <: B). Fixes scala#864, which turned out
to be a long sequence of comparisons between intersections
of singleton types.

Review by @smarter.
odersky added a commit to dotty-staging/dotty that referenced this issue Feb 5, 2016
smarter referenced this issue Feb 8, 2016
Prune constraints that could turn into cycles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants