summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-02-11 08:53:14 -0800
committerPaul Phillips <paulp@improving.org>2013-02-12 11:01:13 -0800
commitc26a8db067e4f04ef959bb9a8402fa3e931c3cd7 (patch)
tree8e920c4fd9ae5182c4175ca40d731dd36c004963 /test/files/run
parent0c59fc9a1416cf5c45699111e8857adb03f7f0d4 (diff)
downloadscala-c26a8db067e4f04ef959bb9a8402fa3e931c3cd7.tar.gz
scala-c26a8db067e4f04ef959bb9a8402fa3e931c3cd7.tar.bz2
scala-c26a8db067e4f04ef959bb9a8402fa3e931c3cd7.zip
Maintenance of Predef.
1) Deprecates much of Predef and scala.Console, especially: - the read* methods (see below) - the set{Out,Err,In} methods (see SI-4793) 2) Removed long-deprecated: - Predef#exit - Predef#error should have gone, but could not due to sbt At least the whole source base has now been future-proofed against the eventual removal of Predef#error. The low justification for the read* methods should be readily apparent: they are little used and have no call to be in global namespace, especially given their weird ad hoc semantics and unreasonably tempting names such as readBoolean(). 3) Segregated the deprecated elements in Predef from the part which still thrives. 4) Converted all the standard Predef implicits into implicit classes, value classes where possible: - ArrowAssoc, Ensuring, StringFormat, StringAdd, RichException (value) - SeqCharSequence, ArrayCharSequence (non-value) Non-implicit deprecated stubs prop up the names of the formerly converting methods.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/Course-2002-07.scala24
-rw-r--r--test/files/run/Course-2002-08.scala4
-rw-r--r--test/files/run/Course-2002-09.scala12
-rw-r--r--test/files/run/Course-2002-13.scala4
-rw-r--r--test/files/run/analyzerPlugins.check13
-rw-r--r--test/files/run/array-charSeq.scala1
-rw-r--r--test/files/run/arrays.scala2
-rw-r--r--test/files/run/exceptions-2.scala50
-rw-r--r--test/files/run/exceptions.scala4
-rw-r--r--test/files/run/exoticnames.scala8
-rw-r--r--test/files/run/genericValueClass.scala11
-rw-r--r--test/files/run/macro-typecheck-implicitsdisabled.check2
-rw-r--r--test/files/run/runtime.scala2
-rw-r--r--test/files/run/t1042.scala2
-rw-r--r--test/files/run/tailcalls.scala18
-rw-r--r--test/files/run/toolbox_typecheck_implicitsdisabled.check2
-rw-r--r--test/files/run/try-2.scala16
-rw-r--r--test/files/run/try.scala10
-rw-r--r--test/files/run/verify-ctor.scala2
19 files changed, 96 insertions, 91 deletions
diff --git a/test/files/run/Course-2002-07.scala b/test/files/run/Course-2002-07.scala
index 7848ae3e8e..055ff74d81 100644
--- a/test/files/run/Course-2002-07.scala
+++ b/test/files/run/Course-2002-07.scala
@@ -16,13 +16,13 @@ object M0 {
def isNumber: Boolean = true;
def isSum: Boolean = false;
def numValue: Int = n;
- def leftOp: Expr = error("Number.leftOp");
- def rightOp: Expr = error("Number.rightOp");
+ def leftOp: Expr = sys.error("Number.leftOp");
+ def rightOp: Expr = sys.error("Number.rightOp");
}
class Sum(e1: Expr, e2: Expr) extends Expr {
def isNumber: Boolean = false;
def isSum: Boolean = true;
- def numValue: Int = error("Sum.numValue");
+ def numValue: Int = sys.error("Sum.numValue");
def leftOp: Expr = e1;
def rightOp: Expr = e2;
}
@@ -30,7 +30,7 @@ object M0 {
class Prod(e1: Expr, e2: Expr) extends Expr {
def isNumber: Boolean = false;
def isSum: Boolean = false;
- def numValue: Int = error("Prod.numValue");
+ def numValue: Int = sys.error("Prod.numValue");
def leftOp: Expr = e1;
def rightOp: Expr = e2;
}
@@ -38,15 +38,15 @@ object M0 {
class Var(x: String) extends Expr {
def isNumber: Boolean = false;
def isSum: Boolean = false;
- def numValue: Int = error("Var.numValue");
- def leftOp: Expr = error("Var.leftOp");
- def rightOp: Expr = error("Var.rightOp");
+ def numValue: Int = sys.error("Var.numValue");
+ def leftOp: Expr = sys.error("Var.leftOp");
+ def rightOp: Expr = sys.error("Var.rightOp");
}
def eval(e: Expr): Int = {
if (e.isNumber) e.numValue
else if (e.isSum) eval(e.leftOp) + eval(e.rightOp)
- else error("unknown expression")
+ else sys.error("unknown expression")
}
def test = {
@@ -375,7 +375,7 @@ object M9 {
object MA {
def lookup[k,v](xs: List[Pair[k,v]], k: k): v = xs match {
- case List() => error("no value for " + k)
+ case List() => sys.error("no value for " + k)
case Pair(k1,v1) :: xs1 => if (k1 == k) v1 else lookup(xs1, k)
}
@@ -410,7 +410,7 @@ object MA {
def eval(e: Expr): Int = e match {
case Number(n) => n
- case Var(_) => error("cannot evaluate variable")
+ case Var(_) => sys.error("cannot evaluate variable")
case Sum(e1, e2) => eval(e1) + eval(e2)
case Prod(e1, e2) => eval(e1) * eval(e2)
}
@@ -453,7 +453,7 @@ object Utils {
if (y == 1) x else if (y % 2 == 0) power0(x*x,y/2) else x*power0(x, y-1);
def power(x: Int, y: Int): Int = (x,y) match {
- case Pair(0,0) => error("power(0,0)")
+ case Pair(0,0) => sys.error("power(0,0)")
case Pair(0,_) => 0
case Pair(1,_) => 1
case Pair(_,0) => 1
@@ -463,7 +463,7 @@ object Utils {
}
def lookup(entries: List[(String,Int)], key: String): Int = entries match {
- case List() => error("no value for " + key)
+ case List() => sys.error("no value for " + key)
case Pair(k,v) :: _ if (k == key) => v
case _ :: rest => lookup(rest, key)
}
diff --git a/test/files/run/Course-2002-08.scala b/test/files/run/Course-2002-08.scala
index 85a83e0146..38b8363661 100644
--- a/test/files/run/Course-2002-08.scala
+++ b/test/files/run/Course-2002-08.scala
@@ -33,7 +33,7 @@ object M1 {
if (0 < amount && amount <= balance) {
balance = balance - amount;
balance
- } else error("insufficient funds");
+ } else sys.error("insufficient funds");
}
def test0 = {
@@ -520,7 +520,7 @@ abstract class CircuitSimulator() extends BasicCircuitSimulator() {
val w1 = new Wire();
val w2 = new Wire();
val w3 = new Wire();
-
+
andGate(in, ctrl(1), w3);
andGate(in, ctrl(1), w2);
andGate(in, ctrlN(1), w1);
diff --git a/test/files/run/Course-2002-09.scala b/test/files/run/Course-2002-09.scala
index 384a91efd8..87f91111d8 100644
--- a/test/files/run/Course-2002-09.scala
+++ b/test/files/run/Course-2002-09.scala
@@ -8,8 +8,8 @@ trait Constraint {
}
object NoConstraint extends Constraint {
- def newValue: Unit = error("NoConstraint.newValue");
- def dropValue: Unit = error("NoConstraint.dropValue");
+ def newValue: Unit = sys.error("NoConstraint.newValue");
+ def dropValue: Unit = sys.error("NoConstraint.dropValue");
}
class Adder(a1: Quantity,a2: Quantity,sum: Quantity) extends Constraint {
@@ -47,7 +47,7 @@ class Multiplier(m1: Quantity, m2: Quantity, prod: Quantity)
class Squarer(square: Quantity, root: Quantity) extends Constraint {
def newValue: Unit = Pair(square.getValue, root.getValue) match {
- case Pair(Some(x), _ )if (x < 0) => error("Square of negative number")
+ case Pair(Some(x), _ )if (x < 0) => sys.error("Square of negative number")
case Pair(Some(x), _ ) => root.setValue(Math.sqrt(x), this)
case Pair(_ , Some(x)) => square.setValue(x*x, this)
case _ =>
@@ -72,8 +72,8 @@ class Eq(a: Quantity, b: Quantity) extends Constraint {
}
class Constant(q: Quantity, v: Double) extends Constraint {
- def newValue: Unit = error("Constant.newValue");
- def dropValue: Unit = error("Constant.dropValue");
+ def newValue: Unit = sys.error("Constant.newValue");
+ def dropValue: Unit = sys.error("Constant.dropValue");
q connect this;
q.setValue(v, this);
}
@@ -100,7 +100,7 @@ class Quantity() {
def setValue(v: Double, setter: Constraint) = value match {
case Some(v1) =>
- if (v != v1) error("Error! contradiction: " + v + " and " + v1);
+ if (v != v1) sys.error("Error! contradiction: " + v + " and " + v1);
case None =>
informant = setter; value = Some(v);
for (c <- constraints; if !(c == informant)) {
diff --git a/test/files/run/Course-2002-13.scala b/test/files/run/Course-2002-13.scala
index c266af8c32..4bd3614fb0 100644
--- a/test/files/run/Course-2002-13.scala
+++ b/test/files/run/Course-2002-13.scala
@@ -42,7 +42,7 @@ object Terms {
}
case class Binding(name: String, term: Term) {
- term match { case Var(n) if (name == n) => error("bad binding") case _ => () }
+ term match { case Var(n) if (name == n) => sys.error("bad binding") case _ => () }
override def toString() = name + " = " + term;
}
@@ -168,7 +168,7 @@ class Parser(s: String) {
var token: String = it.next;
- def syntaxError(msg: String): Unit = error(msg + ", but " + token + " found");
+ def syntaxError(msg: String): Unit = sys.error(msg + ", but " + token + " found");
def rep[a](p: => a): List[a] = {
val t = p;
diff --git a/test/files/run/analyzerPlugins.check b/test/files/run/analyzerPlugins.check
index 0788086459..297bd36bae 100644
--- a/test/files/run/analyzerPlugins.check
+++ b/test/files/run/analyzerPlugins.check
@@ -19,7 +19,7 @@ canAdaptAnnotations(Trees$Typed, Any) [1]
canAdaptAnnotations(Trees$Typed, Int) [1]
lub(List(Int @testAnn, Int)) [1]
pluginsPt(?, Trees$Annotated) [7]
-pluginsPt(?, Trees$Apply) [8]
+pluginsPt(?, Trees$Apply) [9]
pluginsPt(?, Trees$ApplyImplicitView) [2]
pluginsPt(?, Trees$Assign) [7]
pluginsPt(?, Trees$Block) [4]
@@ -31,13 +31,13 @@ pluginsPt(?, Trees$Literal) [16]
pluginsPt(?, Trees$New) [5]
pluginsPt(?, Trees$PackageDef) [1]
pluginsPt(?, Trees$Return) [1]
-pluginsPt(?, Trees$Select) [51]
+pluginsPt(?, Trees$Select) [52]
pluginsPt(?, Trees$Super) [2]
pluginsPt(?, Trees$This) [20]
-pluginsPt(?, Trees$TypeApply) [3]
+pluginsPt(?, Trees$TypeApply) [4]
pluginsPt(?, Trees$TypeBoundsTree) [2]
pluginsPt(?, Trees$TypeDef) [1]
-pluginsPt(?, Trees$TypeTree) [38]
+pluginsPt(?, Trees$TypeTree) [39]
pluginsPt(?, Trees$Typed) [1]
pluginsPt(?, Trees$ValDef) [21]
pluginsPt(Any, Trees$Literal) [2]
@@ -98,6 +98,7 @@ pluginsTyped(()String, Trees$Ident) [1]
pluginsTyped(()String, Trees$TypeApply) [1]
pluginsTyped(()scala.annotation.Annotation, Trees$Select) [1]
pluginsTyped(()testAnn, Trees$Select) [10]
+pluginsTyped(()type, Trees$TypeApply) [1]
pluginsTyped((str: String)A <and> (param: Double)A, Trees$Select) [1]
pluginsTyped((x$1: Any)Boolean <and> (x: Double)Boolean <and> (x: Float)Boolean <and> (x: Long)Boolean <and> (x: Int)Boolean <and> (x: Char)Boolean <and> (x: Short)Boolean <and> (x: Byte)Boolean, Trees$Select) [1]
pluginsTyped((x$1: Int)Unit, Trees$Select) [1]
@@ -174,7 +175,7 @@ pluginsTyped(Unit, Trees$Literal) [5]
pluginsTyped(Unit, Trees$TypeTree) [1]
pluginsTyped([A](xs: A*)List[A], Trees$Select) [1]
pluginsTyped([T <: Int]=> Int, Trees$Select) [1]
-pluginsTyped([T0]()T0, Trees$Select) [1]
+pluginsTyped([T0]()T0, Trees$Select) [2]
pluginsTyped([T](xs: Array[T])scala.collection.mutable.WrappedArray[T], Trees$Select) [1]
pluginsTyped(annotation.type, Trees$Select) [4]
pluginsTyped(math.type, Trees$Select) [9]
@@ -193,5 +194,7 @@ pluginsTyped(testAnn, Trees$New) [5]
pluginsTyped(testAnn, Trees$This) [1]
pluginsTyped(testAnn, Trees$TypeTree) [2]
pluginsTyped(testAnn.super.type, Trees$Super) [1]
+pluginsTyped(type, Trees$Apply) [1]
pluginsTyped(type, Trees$Select) [1]
+pluginsTyped(type, Trees$TypeTree) [1]
pluginsTypedReturn(return f, String) [1]
diff --git a/test/files/run/array-charSeq.scala b/test/files/run/array-charSeq.scala
index f7d0586f03..53796bb9d5 100644
--- a/test/files/run/array-charSeq.scala
+++ b/test/files/run/array-charSeq.scala
@@ -6,6 +6,7 @@ object Test {
def check(chars: CharSequence) {
println("\n[check '" + chars + "'] len = " + chars.length)
chars match {
+ case x: Predef.ArrayCharSequence => assert(x.__arrayOfChars eq arr, ((x.__arrayOfChars, arr)))
case x: runtime.ArrayCharSequence => assert(x.xs eq arr, ((x.xs, arr)))
case x => assert(false, x)
}
diff --git a/test/files/run/arrays.scala b/test/files/run/arrays.scala
index ecebc78a6f..c8bf80ea60 100644
--- a/test/files/run/arrays.scala
+++ b/test/files/run/arrays.scala
@@ -107,7 +107,7 @@ object Test {
val s1 = if (test1) "ok" else "KO";
val s2 = actual.toString();
val s3 = expected.toString();
- error(s0 + " - " + s1 + ": " + s2 + " != " + s3);
+ sys.error(s0 + " - " + s1 + ": " + s2 + " != " + s3);
}
checks += 1
}
diff --git a/test/files/run/exceptions-2.scala b/test/files/run/exceptions-2.scala
index d0312a49b2..f5bbcca210 100644
--- a/test/files/run/exceptions-2.scala
+++ b/test/files/run/exceptions-2.scala
@@ -42,14 +42,14 @@ object NoExcep {
def method4 = try {
Console.println("..");
} catch {
- case _ => error("..");
+ case _ => sys.error("..");
}
}
object Test {
def nested1: Unit = try {
try {
- error("nnnnoooo");
+ sys.error("nnnnoooo");
} finally {
Console.println("Innermost finally");
}
@@ -59,7 +59,7 @@ object Test {
def nested2 = try {
try {
- error("nnnnoooo");
+ sys.error("nnnnoooo");
} finally {
Console.println("Innermost finally");
}
@@ -68,7 +68,7 @@ object Test {
Console.println("Outermost finally");
}
- def mixed =
+ def mixed =
try {
if (10 > 0)
throw Leaf(10);
@@ -107,7 +107,7 @@ object Test {
case Leaf(a) => Console.println(a);
}
} catch {
- case npe: NullPointerException =>
+ case npe: NullPointerException =>
Console.println("Caught an NPE");
}
@@ -134,21 +134,21 @@ object Test {
()
} finally {
try {
- error("a");
+ sys.error("a");
} catch {
case _ => Console.println("Silently ignore exception in finally");
}
}
}
- def valInFinally: Unit =
- try {
+ def valInFinally: Unit =
+ try {
} finally {
val fin = "Abc";
Console.println(fin);
};
- def tryAndValInFinally: Unit =
+ def tryAndValInFinally: Unit =
try {
} finally {
val fin = "Abc";
@@ -157,51 +157,51 @@ object Test {
} catch { case _ => () }
};
- def returnInBody: Unit = try {
+ def returnInBody: Unit = try {
try {
Console.println("Normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
Console.println("inner finally");
}
- } finally {
+ } finally {
Console.println("Outer finally");
}
- def returnInBodySynch: Unit = try {
+ def returnInBodySynch: Unit = try {
synchronized {
try {
Console.println("Synchronized normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
Console.println("inner finally");
}
}
- } finally {
+ } finally {
Console.println("Outer finally");
}
- def returnInBodyAndInFinally: Unit = try {
+ def returnInBodyAndInFinally: Unit = try {
try {
Console.println("Normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
Console.println("inner finally");
return
}
- } finally {
+ } finally {
Console.println("Outer finally");
return
}
- def returnInBodyAndInFinally2: Unit = try {
+ def returnInBodyAndInFinally2: Unit = try {
try {
Console.println("Normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
try {
@@ -211,7 +211,7 @@ object Test {
Console.println("finally inside finally");
}
}
- } finally {
+ } finally {
Console.println("Outer finally");
return
}
@@ -253,7 +253,7 @@ object Test {
}
- def returnWithFinallyClean: Int = try {
+ def returnWithFinallyClean: Int = try {
try {
Console.println("Normal execution...");
return 10
@@ -262,7 +262,7 @@ object Test {
} finally {
Console.println("inner finally");
}
- } finally {
+ } finally {
Console.println("Outer finally");
try { 1 } catch { case e: java.io.IOException => () }
}
@@ -294,7 +294,7 @@ object Test {
Console.println("mixed: ");
execute(mixed);
-
+
Console.println("withValue1:");
execute(withValue1);
@@ -322,7 +322,7 @@ object Test {
Console.println("NoExcep.method3:");
execute(NoExcep.method3);
-
+
Console.println("NoExcep.method4:");
execute(NoExcep.method4);
diff --git a/test/files/run/exceptions.scala b/test/files/run/exceptions.scala
index fc3566f85e..90f681e3c5 100644
--- a/test/files/run/exceptions.scala
+++ b/test/files/run/exceptions.scala
@@ -6,8 +6,8 @@
abstract class IntMap[A] {
def lookup(key: Int): A = this match {
- case Empty() => error("KO")
- case _ => error("ok")
+ case Empty() => sys.error("KO")
+ case _ => sys.error("ok")
}
}
diff --git a/test/files/run/exoticnames.scala b/test/files/run/exoticnames.scala
index fa0e5e6ec5..98f9a88776 100644
--- a/test/files/run/exoticnames.scala
+++ b/test/files/run/exoticnames.scala
@@ -1,7 +1,7 @@
// this is a run-test because the compiler should emit bytecode that'll pass the JVM's verifier
object Test extends App {
- def `(` = error("bla")
- def `.` = error("bla")
- def `)` = error("bla")
- def `,` = error("bla")
+ def `(` = sys.error("bla")
+ def `.` = sys.error("bla")
+ def `)` = sys.error("bla")
+ def `,` = sys.error("bla")
}
diff --git a/test/files/run/genericValueClass.scala b/test/files/run/genericValueClass.scala
index 68162bb685..768e1f86a5 100644
--- a/test/files/run/genericValueClass.scala
+++ b/test/files/run/genericValueClass.scala
@@ -1,11 +1,12 @@
-final class ArrowAssoc[A](val __leftOfArrow: A) extends AnyVal {
- @inline def -> [B](y: B): Tuple2[A, B] = Tuple2(__leftOfArrow, y)
- def →[B](y: B): Tuple2[A, B] = ->(y)
-}
object Test extends App {
+ class ArrowAssocClass[A](val __leftOfArrow: A) extends AnyVal {
+ @inline def -> [B](y: B): Tuple2[A, B] = Tuple2(__leftOfArrow, y)
+ def →[B](y: B): Tuple2[A, B] = ->(y)
+ }
+
{
- @inline implicit def any2ArrowAssoc[A](x: A): ArrowAssoc[A] = new ArrowAssoc(x)
+ @inline implicit def ArrowAssoc[A](x: A): ArrowAssocClass[A] = new ArrowAssocClass(x)
val x = 1 -> "abc"
println(x)
}
diff --git a/test/files/run/macro-typecheck-implicitsdisabled.check b/test/files/run/macro-typecheck-implicitsdisabled.check
index c4fa2c5c28..91d8fabd72 100644
--- a/test/files/run/macro-typecheck-implicitsdisabled.check
+++ b/test/files/run/macro-typecheck-implicitsdisabled.check
@@ -1,2 +1,2 @@
-scala.this.Predef.any2ArrowAssoc[Int](1).->[Int](2)
+scala.this.Predef.ArrowAssoc[Int](1).->[Int](2)
scala.reflect.macros.TypecheckException: value -> is not a member of Int
diff --git a/test/files/run/runtime.scala b/test/files/run/runtime.scala
index 2dcb41fb50..a2ac204e8a 100644
--- a/test/files/run/runtime.scala
+++ b/test/files/run/runtime.scala
@@ -125,7 +125,7 @@ object Test2Test {
object Test3Test {
- class Foo { override def equals(that: Any) = error("abort"); }
+ class Foo { override def equals(that: Any) = sys.error("abort"); }
def check(expected: Boolean, actual1: Boolean, actual2: Boolean): Unit =
Console.println(
diff --git a/test/files/run/t1042.scala b/test/files/run/t1042.scala
index 1f39fff24a..302ff31053 100644
--- a/test/files/run/t1042.scala
+++ b/test/files/run/t1042.scala
@@ -6,7 +6,7 @@ abstract class A {
case class B() extends A {
// overloaded version is implemented, causing toString not to be implemented?
- def toString(sb: StringBuilder): StringBuilder = error("")
+ def toString(sb: StringBuilder): StringBuilder = sys.error("")
}
object Test extends App {
diff --git a/test/files/run/tailcalls.scala b/test/files/run/tailcalls.scala
index 04a1a8ba19..7d06a7e69d 100644
--- a/test/files/run/tailcalls.scala
+++ b/test/files/run/tailcalls.scala
@@ -194,10 +194,10 @@ object FancyTailCalls {
}
object PolyObject extends App {
- def tramp[A](x: Int): Int =
+ def tramp[A](x: Int): Int =
if (x > 0)
tramp[A](x - 1)
- else
+ else
0
}
@@ -233,7 +233,7 @@ class NonTailCall {
if (n == 0) 0
else f2(n - 1)
}
-
+
}
//############################################################################
@@ -273,7 +273,7 @@ object Test {
}
println
}
-
+
def check_overflow(name: String, closure: => Int) {
print("test " + name)
try {
@@ -295,7 +295,7 @@ object Test {
while (!stop) {
try {
calibrator.f(n, n);
- if (n >= Int.MaxValue / 2) error("calibration failure");
+ if (n >= Int.MaxValue / 2) sys.error("calibration failure");
n = 2 * n;
} catch {
case exception: compat.Platform.StackOverflowError => stop = true
@@ -367,7 +367,7 @@ object Test {
check_success("TailCall.g3", TailCall.g3(max, max, Nil), 0)
check_success("TailCall.h1", TailCall.h1(max, max ), 0)
println
-
+
val NonTailCall = new NonTailCall
check_success("NonTailCall.f1", NonTailCall.f1(2), 0)
check_overflow("NonTailCall.f2", NonTailCall.f2(max))
@@ -382,17 +382,17 @@ object Test {
}
// testing explicit tailcalls.
-
+
import scala.util.control.TailCalls._
def isEven(xs: List[Int]): TailRec[Boolean] =
if (xs.isEmpty) done(true) else tailcall(isOdd(xs.tail))
def isOdd(xs: List[Int]): TailRec[Boolean] =
- if (xs.isEmpty) done(false) else tailcall(isEven(xs.tail))
+ if (xs.isEmpty) done(false) else tailcall(isEven(xs.tail))
assert(isEven((1 to 100000).toList).result)
-
+
}
//############################################################################
diff --git a/test/files/run/toolbox_typecheck_implicitsdisabled.check b/test/files/run/toolbox_typecheck_implicitsdisabled.check
index db64e118ca..009ba651fe 100644
--- a/test/files/run/toolbox_typecheck_implicitsdisabled.check
+++ b/test/files/run/toolbox_typecheck_implicitsdisabled.check
@@ -1,5 +1,5 @@
{
import scala.Predef._;
- scala.Predef.any2ArrowAssoc[Int](1).->[Int](2)
+ scala.Predef.ArrowAssoc[Int](1).->[Int](2)
}
scala.tools.reflect.ToolBoxError: reflective typecheck has failed: value -> is not a member of Int
diff --git a/test/files/run/try-2.scala b/test/files/run/try-2.scala
index 677f0b48eb..da321f2668 100644
--- a/test/files/run/try-2.scala
+++ b/test/files/run/try-2.scala
@@ -7,7 +7,7 @@
object Test {
- def tryAllUnit: Unit =
+ def tryAllUnit: Unit =
try {
throw new Error();
}
@@ -15,28 +15,28 @@ object Test {
case _ => Console.println("exception happened\n");
}
- def tryUnitAll: Unit =
+ def tryUnitAll: Unit =
try {
Console.println("Nothin");
} catch {
- case _ => error("Bad, bad, lama!");
+ case _ => sys.error("Bad, bad, lama!");
}
- def tryAllAll: Unit =
+ def tryAllAll: Unit =
try {
throw new Error();
} catch {
- case _ => error("Bad, bad, lama!");
+ case _ => sys.error("Bad, bad, lama!");
}
- def tryUnitUnit: Unit =
+ def tryUnitUnit: Unit =
try {
Console.println("Nothin");
} catch {
case _ => Console.println("Nothin");
}
- def tryIntUnit: Unit =
+ def tryIntUnit: Unit =
try {
10;
} catch {
@@ -55,7 +55,7 @@ object Test {
execute(tryAllUnit);
execute(tryUnitAll);
execute(tryAllAll);
- execute(tryUnitUnit);
+ execute(tryUnitUnit);
execute(tryIntUnit);
}
}
diff --git a/test/files/run/try.scala b/test/files/run/try.scala
index ad3d606246..e393c0b4b1 100644
--- a/test/files/run/try.scala
+++ b/test/files/run/try.scala
@@ -17,8 +17,8 @@ object Test extends AnyRef with App {
Console.println(
(try { x } catch {
case _: Error => 1;
- })
- +
+ })
+ +
(try { x } catch {
case _: Error => 1;
})
@@ -61,13 +61,13 @@ object Test extends AnyRef with App {
Console.print("1 + 1 = ");
try {
if (true)
- error("exit");
+ sys.error("exit");
1+1;
()
} catch {
case _ =>
Console.println("2");
- error("for good");
+ sys.error("for good");
}
Console.println("a");
} catch {
@@ -116,7 +116,7 @@ object Test extends AnyRef with App {
}
*/
-
+
try1;
try2;
try3;
diff --git a/test/files/run/verify-ctor.scala b/test/files/run/verify-ctor.scala
index 17e4f71be5..528d038a8e 100644
--- a/test/files/run/verify-ctor.scala
+++ b/test/files/run/verify-ctor.scala
@@ -1,6 +1,6 @@
class Foo(val str: String) {
def this(arr: Array[Char]) = this({
- if (arr.length == 0) exit(1)
+ if (arr.length == 0) sys.exit(1)
new String(arr)
})
}