summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-12-31 06:51:51 -0800
committerJason Zaugg <jzaugg@gmail.com>2013-12-31 06:51:51 -0800
commitb2bf66a4681dec76281da9469e66e0100ad2709f (patch)
tree311fda392459e96e40b37461bc3d5e531703d37f /test/files/run
parentfbbe7cc1773fad2b261f65b1381f94532d252f6f (diff)
parent72cd50c11b17da19c8b95265503d5aa6e7bd81eb (diff)
downloadscala-b2bf66a4681dec76281da9469e66e0100ad2709f.tar.gz
scala-b2bf66a4681dec76281da9469e66e0100ad2709f.tar.bz2
scala-b2bf66a4681dec76281da9469e66e0100ad2709f.zip
Merge pull request #3297 from paulp/pr/7406
crasher with specialized lazy val
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t7406.check1
-rw-r--r--test/files/run/t7406.scala14
2 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/t7406.check b/test/files/run/t7406.check
new file mode 100644
index 0000000000..f599e28b8a
--- /dev/null
+++ b/test/files/run/t7406.check
@@ -0,0 +1 @@
+10
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)
+ }
+}