summaryrefslogtreecommitdiff
path: root/test/files/run/t7341.scala
blob: ffea7f918b0ef522fe9b9e61a37eda095e58f6df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
object Obj {
  private var cache: Any = ()
  def returning(f: () => Unit) = ()
  def foo {
    returning(() => cache = ())
  }

  def apply(): Any = {
    cache
  }
}

object Test extends App {
  Obj()
}