summaryrefslogtreecommitdiff
path: root/test/files/run/unapply.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/unapply.scala')
-rw-r--r--test/files/run/unapply.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/unapply.scala b/test/files/run/unapply.scala
index 416f8174f4..b4efbda9fa 100644
--- a/test/files/run/unapply.scala
+++ b/test/files/run/unapply.scala
@@ -115,3 +115,19 @@ object StreamFoo extends TestCase("unapply for Streams") with Assert {
assertEquals(sum(str), 6)
}
}
+
+object Test1256 extends TestCase("1256") {
+ class Sync {
+ def unapply(scrut: Any): Boolean = false
+ }
+
+ class Buffer {
+ val Get = new Sync
+
+ val jp: PartialFunction[Any, Any] = {
+ case Get() =>
+ }
+ }
+
+ override def runTest { assertFalse((new Buffer).jp.isDefinedAt(42)) }
+}