summaryrefslogtreecommitdiff
path: root/test/files/pos/lambda.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-06-21 10:36:06 +0000
committerMartin Odersky <odersky@gmail.com>2006-06-21 10:36:06 +0000
commit2933e3f3cce9221a1fbe76b434957f8affb54548 (patch)
treeafce1c862f9f24d3d456a31edd1c1b0c59b7663b /test/files/pos/lambda.scala
parentb444420b5b136e8f6e3439c100fbcc5236e0100b (diff)
downloadscala-2933e3f3cce9221a1fbe76b434957f8affb54548.tar.gz
scala-2933e3f3cce9221a1fbe76b434957f8affb54548.tar.bz2
scala-2933e3f3cce9221a1fbe76b434957f8affb54548.zip
Fixed test files after syntax change for closures.
Diffstat (limited to 'test/files/pos/lambda.scala')
-rw-r--r--test/files/pos/lambda.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/files/pos/lambda.scala b/test/files/pos/lambda.scala
index 187b3f9783..c9094992e8 100644
--- a/test/files/pos/lambda.scala
+++ b/test/files/pos/lambda.scala
@@ -1,8 +1,9 @@
object test {
- def apply[a,b](f: a => b): a => b = x: a => f(x);
+ def apply[a,b](f: a => b): a => b = { x: a => f(x) }
- def twice[a](f: a => a): a => a = x: a => f(f(x));
+ def twice[a](f: a => a): a => a = { x: a => f(f(x)) }
+
+ def main = apply[Int,Int](twice[Int]{x: Int => x})(1);
+}
- def main = apply[Int,Int](twice[Int](x: Int => x))(1);
-} \ No newline at end of file