diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/patmatnew.scala | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index b05da464a5..a61e9eb797 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -44,7 +44,8 @@ object Test extends TestConsoleMain { ClassDefInGuard, Ticket2, Ticket11, - Ticket37 + Ticket37, + Ticket44 ) class Foo(j:Int) { @@ -628,6 +629,25 @@ object Test extends TestConsoleMain { override def runTest { assertEquals(this.a, 2) } } + // #44 + + trait _X { + case class _Foo(); + object _Bar { + def unapply(foo: _Foo):Boolean = true; + } + } + object Y extends _X { + val foo = _Foo() + foo match { + case _Bar() => + case _ => assert(false) + } + } + object Ticket44 extends TestCase("#44") { + override def runTest { assert(Y.toString ne null) /*instantiate Y*/ } + } + } |