summaryrefslogtreecommitdiff
path: root/test/files/run/t7341.scala
blob: dc526c6c193c5ace87175a25be115f7c8c36bb21 (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()
}