diff options
Diffstat (limited to 'test/files/run/t0508.scala')
-rwxr-xr-x | test/files/run/t0508.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/run/t0508.scala b/test/files/run/t0508.scala new file mode 100755 index 0000000000..7ef6f8197f --- /dev/null +++ b/test/files/run/t0508.scala @@ -0,0 +1,13 @@ +object Test extends Application { + + case class Foo(s: String, n: Int) + + def foo[A, B, C](unapply1: A => Option[(B, C)], v: A) = { + unapply1(v) match { + case Some((fst, snd)) => println("first: " + fst, " second: " + snd) + case _ => println(":(") + } + } + + foo(Foo.unapply, Foo("this might be fun", 10)) +} |