From 350f4abecd78ba9ed9aca86022deb8a9992586a5 Mon Sep 17 00:00:00 2001 From: David MacIver Date: Thu, 4 Sep 2008 13:54:09 +0000 Subject: 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. --- test/files/run/t0508.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 test/files/run/t0508.scala (limited to 'test/files/run/t0508.scala') 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)) +} -- cgit v1.2.3