diff options
author | Burak Emir <emir@epfl.ch> | 2007-08-13 14:27:47 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2007-08-13 14:27:47 +0000 |
commit | 3cebbd7ceafac3a653a74f3b22af37e3683566c7 (patch) | |
tree | 778fb05cede5fccf07b853c330ceedd81d64fd06 /test/files/run/patmatnew.scala | |
parent | 974e1a2f9e6253a45b955708bcee3cb706454afe (diff) | |
download | scala-3cebbd7ceafac3a653a74f3b22af37e3683566c7.tar.gz scala-3cebbd7ceafac3a653a74f3b22af37e3683566c7.tar.bz2 scala-3cebbd7ceafac3a653a74f3b22af37e3683566c7.zip |
Definitions, Par: encoding equality patterns us...
Definitions, Par: encoding equality patterns using <equals> pattern type
code generation: if pattern body is throw, generate throw directly (no
sharing) tests:moved unboxmatch into patmatnew
Diffstat (limited to 'test/files/run/patmatnew.scala')
-rw-r--r-- | test/files/run/patmatnew.scala | 14 |
1 files changed, 13 insertions, 1 deletions
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 { |