From 20918420a89091ff5e42a791867a24c6889022c2 Mon Sep 17 00:00:00 2001 From: paltherr Date: Tue, 30 Sep 2003 17:01:13 +0000 Subject: - Renamed bug 135 into 168 - Added new bug 135 --- test/files/run/bugs.scala | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) (limited to 'test/files/run/bugs.scala') diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala index 57b9ff8a08..873006592d 100644 --- a/test/files/run/bugs.scala +++ b/test/files/run/bugs.scala @@ -6,16 +6,20 @@ //############################################################################ // Bug 135 -class Bug135Foo { - class Bar; - def foo = new Bar; -} +object Bug135Test { + + import scala.collection.immutable.TreeMap; + import scala.collection.immutable.Order; -object Bug135Test { def main(args: Array[String]): Unit = { - (new Bug135Foo).foo; - () + val intOrder = + new Order((x:int,y:int) => x < y, (x:int,y:int) => x == y); + val myMap:TreeMap[int,String] = new TreeMap(intOrder); + val map1 = myMap + 42 -> "The answer"; + if (map1.get(42) != Some("The answer")) + Console.println("KO: " + map1.get(42)); } + } //############################################################################ @@ -34,6 +38,21 @@ object Bug167Test { } } +//############################################################################ +// Bug 168 + +class Bug168Foo { + class Bar; + def foo = new Bar; +} + +object Bug168Test { + def main(args: Array[String]): Unit = { + (new Bug168Foo).foo; + () + } +} + //############################################################################ // Main @@ -41,6 +60,7 @@ object Test { def main(args: Array[String]): Unit = { Bug135Test.main(args); Bug167Test.main(args); + Bug168Test.main(args); } } -- cgit v1.2.3