From 3cebbd7ceafac3a653a74f3b22af37e3683566c7 Mon Sep 17 00:00:00 2001 From: Burak Emir Date: Mon, 13 Aug 2007 14:27:47 +0000 Subject: Definitions, Par: encoding equality patterns us... Definitions, Par: encoding equality patterns using pattern type code generation: if pattern body is throw, generate throw directly (no sharing) tests:moved unboxmatch into patmatnew --- test/files/run/patmatnew.scala | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'test/files/run/patmatnew.scala') diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index d9e36a35fe..a54bac814f 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -31,7 +31,8 @@ object Test extends TestConsoleMain { new TestStream, new Test903, new Test1093, - new Test1163_Order + new Test1163_Order, + new TestUnbox ) class Foo(j:Int) { @@ -133,6 +134,17 @@ object Test extends TestConsoleMain { def runTest() = assertEquals("both", (Var("x"),Var("y")), f) } + class TestUnbox extends TestCase("unbox") { + override def runTest() { + val xyz: (int, String, boolean) = (1, "abc", true) + xyz._1 match { + case 1 => "OK" + case 2 => assert(false); "KO" + case 3 => assert(false); "KO" + } + } + } + class Test806_818 { // #806, #811 compile only -- type of bind // bug811 trait Core { -- cgit v1.2.3