diff options
author | Paul Phillips <paulp@improving.org> | 2012-04-12 20:35:05 +0100 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-04-12 21:56:20 +0100 |
commit | f1c6714e22e70ecba2aa595bf592b916be82deb4 (patch) | |
tree | 9c59c245a90cade2c9747ee82a4bba62d3aafe32 /test/files | |
parent | cfc4757a580c537425857ff849f3dc106d924092 (diff) | |
download | scala-f1c6714e22e70ecba2aa595bf592b916be82deb4.tar.gz scala-f1c6714e22e70ecba2aa595bf592b916be82deb4.tar.bz2 scala-f1c6714e22e70ecba2aa595bf592b916be82deb4.zip |
Fix for SI-5535.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t5535.check | 20 | ||||
-rw-r--r-- | test/files/run/t5535.scala | 10 |
2 files changed, 30 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)) + """ +} |