diff options
author | Martin Odersky <odersky@gmail.com> | 2012-04-13 16:27:46 -0700 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2012-04-13 16:27:46 -0700 |
commit | 2744be417e1f2c461068bb2daef9fa8f11822031 (patch) | |
tree | 06580aa466401d86d63176b2af429e9daaf047f9 /test/files/run | |
parent | b5757577c520e6339e4278fa91f725e66561f73e (diff) | |
parent | 1d0610840bb7409f0da084d3cc94e4110dd2e2c4 (diff) | |
download | scala-2744be417e1f2c461068bb2daef9fa8f11822031.tar.gz scala-2744be417e1f2c461068bb2daef9fa8f11822031.tar.bz2 scala-2744be417e1f2c461068bb2daef9fa8f11822031.zip |
Merge branch 'master' into topic/sip18
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t5535.check | 20 | ||||
-rw-r--r-- | test/files/run/t5535.scala | 10 | ||||
-rw-r--r-- | test/files/run/t5583.check | 20 | ||||
-rw-r--r-- | test/files/run/t5583.scala | 11 |
4 files changed, 61 insertions, 0 deletions
diff --git a/test/files/run/t5535.check b/test/files/run/t5535.check new file mode 100644 index 0000000000..8da9829b78 --- /dev/null +++ b/test/files/run/t5535.check @@ -0,0 +1,20 @@ +Type in expressions to have them evaluated. +Type :help for more information. + +scala> + +scala> def h()(i: Int) = 1 + i +h: ()(i: Int)Int + +scala> println(h()(5)) +6 + +scala> val f = h() _ +f: Int => Int = <function1> + +scala> println(f(10)) +11 + +scala> + +scala> diff --git a/test/files/run/t5535.scala b/test/files/run/t5535.scala new file mode 100644 index 0000000000..7bc12f3470 --- /dev/null +++ b/test/files/run/t5535.scala @@ -0,0 +1,10 @@ +import scala.tools.partest.ReplTest + +object Test extends ReplTest { + def code = """ +def h()(i: Int) = 1 + i +println(h()(5)) +val f = h() _ +println(f(10)) + """ +} diff --git a/test/files/run/t5583.check b/test/files/run/t5583.check new file mode 100644 index 0000000000..39b969fbe7 --- /dev/null +++ b/test/files/run/t5583.check @@ -0,0 +1,20 @@ +Type in expressions to have them evaluated. +Type :help for more information. + +scala> + +scala> var s = 0 +s: Int = 0 + +scala> for (i <- 1 to 10) {s += i} + +scala> for (i <- 1 to 10) {s += i} + +scala> for (i <- 1 to 10) {s += i} + +scala> println(s) +165 + +scala> + +scala> diff --git a/test/files/run/t5583.scala b/test/files/run/t5583.scala new file mode 100644 index 0000000000..8561a5946f --- /dev/null +++ b/test/files/run/t5583.scala @@ -0,0 +1,11 @@ +import scala.tools.partest.ReplTest + +object Test extends ReplTest { + def code = """ +var s = 0 +for (i <- 1 to 10) {s += i} +for (i <- 1 to 10) {s += i} +for (i <- 1 to 10) {s += i} +println(s) + """ +} |