Skip to content

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

Closed
@smarter

Description

@smarter

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
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions