diff options
author | Paul Phillips <paulp@improving.org> | 2009-07-05 23:22:43 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-07-05 23:22:43 +0000 |
commit | 26bca73b09d29a7978acdda36d2f85478343f9f4 (patch) | |
tree | 4c6f0fcf7f0dbee74b0e7572bbb41d8122882b50 /test | |
parent | 129cdce82583a07a7b18f850c287553134054867 (diff) | |
download | scala-26bca73b09d29a7978acdda36d2f85478343f9f4.tar.gz scala-26bca73b09d29a7978acdda36d2f85478343f9f4.tar.bz2 scala-26bca73b09d29a7978acdda36d2f85478343f9f4.zip |
Implemented proposed strategy for #1503 and mov...
Implemented proposed strategy for #1503 and moved test case out of
pending (and fixed it so it didn't throw a match error.)
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/castsingleton.check (renamed from test/pending/run/castsingleton.check) | 0 | ||||
-rw-r--r-- | test/files/run/castsingleton.scala (renamed from test/pending/run/castsingleton.scala) | 3 | ||||
-rw-r--r-- | test/files/run/patmatnew.scala | 7 |
3 files changed, 7 insertions, 3 deletions
diff --git a/test/pending/run/castsingleton.check b/test/files/run/castsingleton.check index 49742281f0..49742281f0 100644 --- a/test/pending/run/castsingleton.check +++ b/test/files/run/castsingleton.check diff --git a/test/pending/run/castsingleton.scala b/test/files/run/castsingleton.scala index 171b380dc9..f907467741 100644 --- a/test/pending/run/castsingleton.scala +++ b/test/files/run/castsingleton.scala @@ -3,7 +3,8 @@ object Test extends Application { object N extends L(); def empty(xs : L) : Unit = xs match { - case x@N => println(x); println(x); + case x@N => println(x); println(x); + case x => println(x); println(x); } empty(L()) diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index a16f300414..0ab5e92099 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -876,8 +876,11 @@ object C { } override def runTest() { - assertTrue(empty( new L(Nil) )) - assertTrue(singleton( new L(List(1)) )) + // We no longer assert these are true, because they are no longer true! + // See ticket #1503 for details, but it is unsound to let L(Nil) be + // seen as an N by the LHS of a match. + // assertTrue(empty( new L(Nil) )) + // assertTrue(singleton( new L(List(1)) )) } } // end Ticket346 |