diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2005-11-10 09:05:41 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2005-11-10 09:05:41 +0000 |
commit | d888c78872d9170ee5627f8f435c261ac6df70e5 (patch) | |
tree | 8caff12e9131640412e2f59a7e344a76658efbdf | |
parent | 52e169b78958aacef54bcf32e9da7cc4b72ff8b2 (diff) | |
download | scala-d888c78872d9170ee5627f8f435c261ac6df70e5.tar.gz scala-d888c78872d9170ee5627f8f435c261ac6df70e5.tar.bz2 scala-d888c78872d9170ee5627f8f435c261ac6df70e5.zip |
Updated test.
-rw-r--r-- | test-nsc/files/run/bug457.check | 0 | ||||
-rwxr-xr-x | test-nsc/files/run/bug457.scala | 34 |
2 files changed, 21 insertions, 13 deletions
diff --git a/test-nsc/files/run/bug457.check b/test-nsc/files/run/bug457.check new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test-nsc/files/run/bug457.check diff --git a/test-nsc/files/run/bug457.scala b/test-nsc/files/run/bug457.scala index 5b1462f7e2..98983a2fa2 100755 --- a/test-nsc/files/run/bug457.scala +++ b/test-nsc/files/run/bug457.scala @@ -1,16 +1,18 @@ -object Foo { -// def method= { -// val x = "Hello, world"; -// val y = 100; -// y match { -// case _: Int -// if (x match { case t => t.trim().length() == 0 }) => -// false; -// // case _ => true; -// } -// } +object Test { + + def method1() = { + val x = "Hello, world"; + val y = 100; + + y match { + case _: Int + if (x match { case t => t.trim().length() > 0 }) => + false; + case _ => true; + } + } def method2(): scala.Boolean = { val x: java.lang.String = "Hello, world"; @@ -20,12 +22,12 @@ object Foo { var result: scala.Boolean = false; if ( { - var result1: scala.Boolean = false; + var result1: scala.Boolean = true; if (y == 100) result1 else scala.MatchError.fail("crazybox.scala", 11) - } && (y == 90) + } && (y > 90) ) result else @@ -33,4 +35,10 @@ object Foo { } } + def main(args: Array[String]): Unit = { + method1(); + method2(); + } + } + |