aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/functions1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/functions1.scala')
-rw-r--r--tests/pos/functions1.scala21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/pos/functions1.scala b/tests/pos/functions1.scala
index 12df12e50..99709bc88 100644
--- a/tests/pos/functions1.scala
+++ b/tests/pos/functions1.scala
@@ -10,5 +10,24 @@ object Functions {
val xf2: String => Int = x.foo(_)
val x2: String => Int = x.foo
val x3 = x.foo _
-
+ /*
+ abstract class Spore[T, U] {
+ def run(x: T): U
+ }
+
+ trait Spore2[T, U] { self: Spore2[T, U] =>
+ def run(x: T): U
+ }
+
+ val x: String => String = {
+ case "abc" => ""
+ case x => x
+ }
+ val y: PartialFunction[String, String] = x => x match {
+ case "abc" => ""
+ case _ => x
+ }
+ val z: Spore[String, String] = x => x + x
+ val z2: Spore2[String, String] = x => x + x
+ */
}