diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/unapply.scala | 16 |
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)) } +} |