From e33901084242b4d7cd76a9279430d0cbc9b9a152 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Sun, 13 May 2012 22:43:06 +0200 Subject: Fix for SI-5610 --- test/files/run/t5610.scala | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/files/run/t5610.scala (limited to 'test/files/run/t5610.scala') diff --git a/test/files/run/t5610.scala b/test/files/run/t5610.scala new file mode 100644 index 0000000000..f62b2df6b4 --- /dev/null +++ b/test/files/run/t5610.scala @@ -0,0 +1,30 @@ +object Test { + def main(args: Array[String]): Unit = { + var test: String = null + val fun1: Int => () => Unit = foo(test) _ + val fun2: Int => () => Unit = foo(test)(_) + val fun3: Int => () => Unit = { + lazy val eta1: String = test + (dummy: Int) => foo(eta1)(dummy) + } + val fun4: Int => () => Unit = { + val eta1: () => String = () => test + (dummy: Int) => foo(eta1())(dummy) + } + test = "some string" + fun1(1)() + fun2(1)() + fun3(1)() + fun4(1)() + + val f: (String, Int*) => Unit = m(2, 3) + f("", 5, 6) + } + + def foo(s: => String)(dummy: Int) = () => println(s) + + def m(a: Int*)(z: String, b: Int*) { + println(a.toList) + println(b.toList) + } +} -- cgit v1.2.3