aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t7406.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/t7406.scala')
-rw-r--r--tests/run/t7406.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/run/t7406.scala b/tests/run/t7406.scala
new file mode 100644
index 000000000..a8b35c91c
--- /dev/null
+++ b/tests/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)
+ }
+}