aboutsummaryrefslogblamecommitdiff
path: root/tests/pos/intersection.scala
blob: 2b9f6c0b72bab51f1b59066207641d5598c835f2 (plain) (tree)


















                                      
object intersection {

  class A
  class B

  val x: A => Unit = ???
  val y: B => Unit = ???

  val z = if (???) x else y

  val a: A & B => Unit = z
  val b: (A => Unit) | (B => Unit) = z




  type needsA = A => Nothing
  type needsB = B => Nothing
}