aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t252.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/t252.scala')
-rw-r--r--tests/pos/t252.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pos/t252.scala b/tests/pos/t252.scala
index d51b5511e..ac4e97106 100644
--- a/tests/pos/t252.scala
+++ b/tests/pos/t252.scala
@@ -11,6 +11,18 @@ abstract class Base {
}
abstract class Derived extends Base {
+
+ val t: T = ???
+
+ // trying a simple dependent closure body first
+ def cont1[X, Y](x: X)(f: X => Y): Y = f(x)
+ cont1(t)(x => x.module)
+
+ // trying an indirectly dependent closure body first
+ def cont2[X, Y](x: X)(f: X => Int => Y): Y = f(x)(1)
+ cont2(t)(x => z => x.module)
+
+ // trying the original, harder case next
def f(inputs: List[tType]): Unit = {
for (t <- inputs; m = t.module) { }
}