diff options
author | David MacIver <david.maciver@gmail.com> | 2008-09-04 13:54:09 +0000 |
---|---|---|
committer | David MacIver <david.maciver@gmail.com> | 2008-09-04 13:54:09 +0000 |
commit | 350f4abecd78ba9ed9aca86022deb8a9992586a5 (patch) | |
tree | 3de3d8b952330956a7f95824980956c6ea2d20f3 /test/files/run/t0508.scala | |
parent | 329de99b63e0c69403c9c6e3084493c58c430a8e (diff) | |
download | scala-350f4abecd78ba9ed9aca86022deb8a9992586a5.tar.gz scala-350f4abecd78ba9ed9aca86022deb8a9992586a5.tar.bz2 scala-350f4abecd78ba9ed9aca86022deb8a9992586a5.zip |
Fixed RefChecks to not replace unapplies with c...
Fixed RefChecks to not replace unapplies with constructors (ticket
0508). Moved test for this from pending to main tests.
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)) +} |