aboutsummaryrefslogblamecommitdiff
path: root/tests/neg/escapingRefs.scala
blob: 9a76eb4146844bd86ee017fb815193497971f6ee (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                                                   
object O {
  class A
  class B
  def f[T](x: T, y: T): T = y

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

  val y = f({ class C { def member: Int = 1 }; new C }, { class C { def member: Int = 1 }; new C })
  val z = y.member
}