diff options
Diffstat (limited to 'tests/run/t7341.scala')
-rwxr-xr-x | tests/run/t7341.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/run/t7341.scala b/tests/run/t7341.scala new file mode 100755 index 000000000..812b316f9 --- /dev/null +++ b/tests/run/t7341.scala @@ -0,0 +1,15 @@ +object Obj { + private var cache: Any = () + def returning(f: () => Unit) = () + def foo: Unit = { + returning(() => cache = ()) + } + + def apply(): Any = { + cache + } +} + +object Test extends dotty.runtime.LegacyApp { + Obj() +} |