From ca9f4fbb7b1212cfcde866ee95957afc6d157943 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 11 Jul 2003 13:02:40 +0000 Subject: *** empty log message *** --- test/pos/cours2c.scala | 6 +++--- test/pos/exceptions.scala | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'test/pos') diff --git a/test/pos/cours2c.scala b/test/pos/cours2c.scala index 776469e1bb..e3917e43eb 100644 --- a/test/pos/cours2c.scala +++ b/test/pos/cours2c.scala @@ -32,12 +32,12 @@ object m2 { def average(x: Double, y: Double) = (x + y)/2; def fixedPoint(f: Double => Double, firstGuess: Double) = { - def try(guess: Double): Double = { + def Try(guess: Double): Double = { val next = f(guess); if (isCloseEnough(guess, next)) next - else try(next) + else Try(next) } - try(firstGuess); + Try(firstGuess); } def sin(x: Double): Double = x; diff --git a/test/pos/exceptions.scala b/test/pos/exceptions.scala index c47b0e4785..f28a10d367 100644 --- a/test/pos/exceptions.scala +++ b/test/pos/exceptions.scala @@ -4,7 +4,7 @@ object test { //def error[a](x: String):a = new java.lang.RuntimeException(x) throw; - def main(): Unit = { + def main(args: Array[String]): Unit = { try { try { System.out.println("hi!"); @@ -12,11 +12,10 @@ object test { } finally { System.out.println("ho!") } - } except { + } catch { case ex: IOException => System.out.println("io exception!"); case ex => System.out.println(ex); } } - main(); } -- cgit v1.2.3