diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/patmatnew.check | 2 | ||||
-rw-r--r-- | test/files/run/patmatnew.scala | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/test/files/run/patmatnew.check b/test/files/run/patmatnew.check new file mode 100644 index 0000000000..0747cddefb --- /dev/null +++ b/test/files/run/patmatnew.check @@ -0,0 +1,2 @@ +warning: there were unchecked warnings; re-run with -unchecked for details +one warning found diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index 09b12f710c..c8ca9c19cb 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -42,7 +42,8 @@ object Test extends TestConsoleMain { Bug1093, Bug1094, ClassDefInGuard, - Ticket_2 + Ticket2, + Ticket37 ) class Foo(j:Int) { @@ -578,7 +579,7 @@ object Test extends TestConsoleMain { } } - object Ticket_2 extends TestCase("#2") { override def runTest { + object Ticket2 extends TestCase("#2") { override def runTest { val o1 = new Outer_2; val o2 = new Outer_2; val x: Any = o1.Foo(1, 2); val y: Any = o2.Foo(1, 2) assertFalse("equals test returns true (but should not)", x equals y) assertTrue("match enters wrong case", x match { @@ -588,6 +589,14 @@ object Test extends TestConsoleMain { }) }} + // #37 + + object Ticket37 extends TestCase("#37") { + def foo() {} + val (a,b):(int,int) = { foo(); (2,3) } + override def runTest { assertEquals(this.a, 2) } + } + } |