diff options
author | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-05-16 04:53:05 -0700 |
---|---|---|
committer | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-05-16 04:53:05 -0700 |
commit | 8a42d535dbef45bc18cf4232912842dddd85d1e4 (patch) | |
tree | 56edc480bbbd712f31118f6592428457266988f9 /test/files/run | |
parent | e0e1ac5f66caf011ccc27ea993653fc4f87f726b (diff) | |
parent | e33901084242b4d7cd76a9279430d0cbc9b9a152 (diff) | |
download | scala-8a42d535dbef45bc18cf4232912842dddd85d1e4.tar.gz scala-8a42d535dbef45bc18cf4232912842dddd85d1e4.tar.bz2 scala-8a42d535dbef45bc18cf4232912842dddd85d1e4.zip |
Merge pull request #557 from lrytz/wip/t5610
Fix for SI-5610
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t5610.check | 6 | ||||
-rw-r--r-- | test/files/run/t5610.scala | 30 |
2 files changed, 36 insertions, 0 deletions
diff --git a/test/files/run/t5610.check b/test/files/run/t5610.check new file mode 100644 index 0000000000..023f18d8f1 --- /dev/null +++ b/test/files/run/t5610.check @@ -0,0 +1,6 @@ +some string +some string +some string +some string +List(2, 3) +List(5, 6) 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) + } +} |