summaryrefslogtreecommitdiff
path: root/test/files/run/spec-self.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-10-14 04:27:35 +0000
committerPaul Phillips <paulp@improving.org>2011-10-14 04:27:35 +0000
commit9ea2cefb2079aebad2b215f6a699fe6262e2c7a7 (patch)
treee4d894071f77fce25db53aef313afc4b111c2362 /test/files/run/spec-self.scala
parentfcd0998f1e0f2307e9b0cbae6bf2c36234ca8d17 (diff)
downloadscala-9ea2cefb2079aebad2b215f6a699fe6262e2c7a7.tar.gz
scala-9ea2cefb2079aebad2b215f6a699fe6262e2c7a7.tar.bz2
scala-9ea2cefb2079aebad2b215f6a699fe6262e2c7a7.zip
Another swing at r25823.
I verified this creates identical library bytecode so I anticipate no regressions. Review by prokopec anyway.
Diffstat (limited to 'test/files/run/spec-self.scala')
-rw-r--r--test/files/run/spec-self.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/spec-self.scala b/test/files/run/spec-self.scala
new file mode 100644
index 0000000000..1c95e0a820
--- /dev/null
+++ b/test/files/run/spec-self.scala
@@ -0,0 +1,14 @@
+class Foo0 extends (() => Double) {
+ def apply() = 5.0d
+}
+
+class Foo1 extends (Double => Double) {
+ def apply(x: Double) = x
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ println((new Foo0)())
+ println((new Foo1)(5.0d))
+ }
+}