diff options
author | schinz <schinz@epfl.ch> | 2003-12-10 15:26:03 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2003-12-10 15:26:03 +0000 |
commit | 904d31853dda3e962c503f48113b2f96c9305f13 (patch) | |
tree | c319b55702794cee209d945374713753284b507b /test/files/run | |
parent | 44e74c63819b375099a0033f6146049dc4fd1646 (diff) | |
download | scala-904d31853dda3e962c503f48113b2f96c9305f13.tar.gz scala-904d31853dda3e962c503f48113b2f96c9305f13.tar.bz2 scala-904d31853dda3e962c503f48113b2f96c9305f13.zip |
- added bugs 98, 120 and 250
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/bugs.check | 15 | ||||
-rw-r--r-- | test/files/run/bugs.scala | 46 |
2 files changed, 61 insertions, 0 deletions
diff --git a/test/files/run/bugs.check b/test/files/run/bugs.check index 5b69f83156..7bdeb7d655 100644 --- a/test/files/run/bugs.check +++ b/test/files/run/bugs.check @@ -1,3 +1,15 @@ +<<< bug 98 +mycase +>>> bug 98 + +<<< bug 120 +one +A +two +B +C +>>> bug 120 + <<< bug 135 Some(The answer) >>> bug 135 @@ -51,3 +63,6 @@ ok true >>> bug 233 +<<< bug 250 +>>> bug 250 + diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala index ebaaa1342b..153c1e2f90 100644 --- a/test/files/run/bugs.scala +++ b/test/files/run/bugs.scala @@ -6,6 +6,39 @@ import java.lang.System; // to avoid name clash with .NET's library //############################################################################ +// Bug 98 + +object Bug98Test { + object MyCase { def name = "mycase" }; + def main(args: Array[String]) = { + System.out.println(MyCase.name); + } +} + +//############################################################################ +// Bug 120 + +class Bug120A(x: Int) { + System.out.println("A"); +} +class Bug120B(x: Int) { + System.out.println("B"); +} +class Bug120C(x: Int) + with Bug120A(Bug120Test.print("one", 1)) + with Bug120B(Bug120Test.print("two", 2)) { + System.out.println("C"); +} +object Bug120Test { + def print[A](str: String, res: A): A = { + System.out.println(str); res + } + def main(args: Array[String]) = { + val c = new Bug120C(1); + } +} + +//############################################################################ // Bug 135 object Bug135Test { @@ -252,6 +285,16 @@ object Bug233Test { } //############################################################################ +// Bug 250 + +object Bug250Test { + def main(args: Array[String]): Unit = { + if (true) null; + () + } +} + +//############################################################################ // Main object Test { @@ -275,6 +318,8 @@ object Test { def main(args: Array[String]): Unit = { + test( 98, Bug98Test.main(args)); + test(120, Bug120Test.main(args)); test(135, Bug135Test.main(args)); test(142, Bug142Test.main(args)); test(166, Bug166Test.main(args)); @@ -289,6 +334,7 @@ object Test { test(225, Bug225Test.main(args)); test(226, Bug226Test.main(args)); test(233, Bug233Test.main(args)); + test(250, Bug250Test.main(args)); if (errors > 0) { System.out.println(); |