aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/anonClassSubtyping.scala
blob: b5591d826412028d1de2939bbf634c4c0c8f0025 (plain) (blame)
1
2
3
4
5
6
7
8
9
object O {
  class A
  class B
  def f[T](x: T, y: T): T = x

  val x: A = f(new A { }, new A)

  val y: A | B = f(new A { }, new B)
}