summaryrefslogtreecommitdiff
path: root/test/files/run/unapply.scala
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2007-08-15 17:01:29 +0000
committerBurak Emir <emir@epfl.ch>2007-08-15 17:01:29 +0000
commitcbba5153da6cb1e6ef9f58fb8f1eb7c284841f11 (patch)
tree0a76288db6d1e36dcadf17c145311314e2e90eff /test/files/run/unapply.scala
parent6b573ed92f9f160de1b2733d2547e8a72c989564 (diff)
downloadscala-cbba5153da6cb1e6ef9f58fb8f1eb7c284841f11.tar.gz
scala-cbba5153da6cb1e6ef9f58fb8f1eb7c284841f11.tar.bz2
scala-cbba5153da6cb1e6ef9f58fb8f1eb7c284841f11.zip
fixed Philipp's bug #1256 for real this time, u...
fixed Philipp's bug #1256 for real this time, use switch for characters (includes ugly boxing bug workaround), use StdNames in CodeFactory
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)) }
+}