summaryrefslogtreecommitdiff
path: root/test/files/run/patmatnew.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/patmatnew.scala')
-rw-r--r--test/files/run/patmatnew.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala
index c55e7821df..a28f94c539 100644
--- a/test/files/run/patmatnew.scala
+++ b/test/files/run/patmatnew.scala
@@ -28,6 +28,7 @@ object Test extends TestConsoleMain {
new SimpleUnapply,
new Test717,
new TestGuards,
+ TestEqualsPatternOpt,
new TestStream,
new Test903,
new Test1093,
@@ -101,6 +102,17 @@ object Test extends TestConsoleMain {
}
}
+ object TestEqualsPatternOpt extends TestCase("test EqualsPatternClass in combination with MixTypes opt, bug #1276") {
+ val NoContext = new Object
+ override def runTest {
+ assertEquals(1,((NoContext:Any) match {
+ case that : AnyRef if this eq that => 0
+ case NoContext => 1
+ case _ => 2
+ }))
+ }
+ }
+
class TestStream extends TestCase("unapply for Streams") {
def sum(stream: Stream[int]): int =
stream match {