diff options
author | Paul Phillips <paulp@improving.org> | 2013-12-21 13:05:29 -1000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-12-21 13:13:52 -1000 |
commit | 72cd50c11b17da19c8b95265503d5aa6e7bd81eb (patch) | |
tree | 01634533a2c8a009178fa0c63a6fa3d3ef1860c3 /test/files/run/t7406.scala | |
parent | 9f0594c57716ed551918e15be6da843982e8ba12 (diff) | |
download | scala-72cd50c11b17da19c8b95265503d5aa6e7bd81eb.tar.gz scala-72cd50c11b17da19c8b95265503d5aa6e7bd81eb.tar.bz2 scala-72cd50c11b17da19c8b95265503d5aa6e7bd81eb.zip |
SI-7406 crasher with specialized lazy val
This reverts a tiny bit of f7d5f45aa7 where the crasher was
introduced. The enclosed test case compiles and runs under 2.9,
but prints the wrong answer. It crashes in 2.10 and until this
patch. Now it compiles and prints the right answer.
Diffstat (limited to 'test/files/run/t7406.scala')
-rw-r--r-- | test/files/run/t7406.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t7406.scala b/test/files/run/t7406.scala new file mode 100644 index 0000000000..a8b35c91c9 --- /dev/null +++ b/test/files/run/t7406.scala @@ -0,0 +1,14 @@ +class Arne[@specialized(Long) T](x: T) { + val regularVal = x + lazy val lazyVal = x + + def apply(f: (T, T) => T): T = f(regularVal, lazyVal) +} + +object Test { + val arne = new Arne(5L) + def f = arne(_ + _) + def main(args: Array[String]): Unit = { + println(f) + } +} |