diff options
author | Burak Emir <emir@epfl.ch> | 2007-09-04 20:33:11 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2007-09-04 20:33:11 +0000 |
commit | 24943dad3c75753fec40ca1fa16583b567c520f3 (patch) | |
tree | 6bfe42241a818fed016f1f61e3ecc70519a95248 /test/files | |
parent | 4d9354ae14d581fb548d1e926fbf3adb7d3bf615 (diff) | |
download | scala-24943dad3c75753fec40ca1fa16583b567c520f3.tar.gz scala-24943dad3c75753fec40ca1fa16583b567c520f3.tar.bz2 scala-24943dad3c75753fec40ca1fa16583b567c520f3.zip |
fixed odd typing bug #44
Diffstat (limited to 'test/files')
-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*/ } + } + } |