summaryrefslogtreecommitdiff
path: root/test/files/pos
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/pos
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/pos')
-rw-r--r--test/files/pos/List1.scala6
-rw-r--r--test/files/pos/depmet_implicit_chaining_zw.scala6
-rw-r--r--test/files/pos/depmet_implicit_norm_ret.scala20
-rw-r--r--test/files/pos/implicits-new.scala8
-rw-r--r--test/files/pos/implicits-old.scala40
-rw-r--r--test/files/pos/relax_implicit_divergence.scala6
-rw-r--r--test/files/pos/simple-exceptions.scala2
-rw-r--r--test/files/pos/spec-asseenfrom.scala6
-rw-r--r--test/files/pos/spec-cyclic.scala10
-rw-r--r--test/files/pos/spec-sealed.scala8
-rw-r--r--test/files/pos/spec-sparsearray-new.scala16
-rw-r--r--test/files/pos/spec-sparsearray-old.scala14
-rw-r--r--test/files/pos/spec-traits.scala12
-rw-r--r--test/files/pos/t0031.scala6
-rw-r--r--test/files/pos/t0227.scala4
-rw-r--r--test/files/pos/t2331.scala4
-rw-r--r--test/files/pos/t2421.scala14
-rwxr-xr-xtest/files/pos/t2429.scala10
-rw-r--r--test/files/pos/t2797.scala4
-rw-r--r--test/files/pos/t3152.scala10
-rw-r--r--test/files/pos/t3252.scala6
-rw-r--r--test/files/pos/t3349/Test.scala4
-rw-r--r--test/files/pos/t3363-new.scala4
-rw-r--r--test/files/pos/t3363-old.scala2
-rw-r--r--test/files/pos/t3440.scala10
-rw-r--r--test/files/pos/t3477.scala4
-rw-r--r--test/files/pos/t3731.scala4
-rw-r--r--test/files/pos/t3883.scala8
-rw-r--r--test/files/pos/t3927.scala4
-rw-r--r--test/files/pos/tcpoly_boundedmonad.scala18
-rw-r--r--test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala8
-rw-r--r--test/files/pos/tcpoly_infer_implicit_tuple_wrapper.scala4
-rw-r--r--test/files/pos/tcpoly_overloaded.scala18
-rw-r--r--test/files/pos/tcpoly_subst.scala2
-rw-r--r--test/files/pos/tcpoly_variance_pos.scala4
-rw-r--r--test/files/pos/tcpoly_wildcards.scala2
-rw-r--r--test/files/pos/typealias_dubious.scala14
-rw-r--r--test/files/pos/virtpatmat_binding_opt.scala4
38 files changed, 163 insertions, 163 deletions
diff --git a/test/files/pos/List1.scala b/test/files/pos/List1.scala
index 9d3a51f4e3..30ebf5e1e7 100644
--- a/test/files/pos/List1.scala
+++ b/test/files/pos/List1.scala
@@ -9,15 +9,15 @@ object lists {
def Nil[b] = new List[b] {
def isEmpty: Boolean = true;
- def head = error("head of Nil");
- def tail = error("tail of Nil");
+ def head = sys.error("head of Nil");
+ def tail = sys.error("tail of Nil");
}
def Cons[c](x: c, xs: List[c]): List[c] = new List[c] {
def isEmpty = false;
def head = x;
def tail = xs;
- }
+ }
def foo = {
val intnil = Nil[Int];
diff --git a/test/files/pos/depmet_implicit_chaining_zw.scala b/test/files/pos/depmet_implicit_chaining_zw.scala
index 93da3b0f8e..ce5ea476d8 100644
--- a/test/files/pos/depmet_implicit_chaining_zw.scala
+++ b/test/files/pos/depmet_implicit_chaining_zw.scala
@@ -3,7 +3,7 @@ trait Succ[N]
trait ZipWith[N, S] {
type T
- val x: T = error("")
+ val x: T = sys.error("")
}
object ZipWith {
@@ -15,7 +15,7 @@ object ZipWith {
type T = Stream[S] => zWith.T // dependent types replace the associated types functionality
}
- // can't use implicitly[ZipWith[Succ[Succ[Zero]], Int => String => Boolean]],
+ // can't use implicitly[ZipWith[Succ[Succ[Zero]], Int => String => Boolean]],
// since that will chop of the {type T = ... } refinement in adapt (pt = ZipWith[Succ[Succ[Zero]], Int => String => Boolean])
// this works
// def zipWith(implicit zw: ZipWith[Succ[Succ[Zero]], Int => String => Boolean]): zw.T = zw.x
@@ -25,4 +25,4 @@ object ZipWith {
type _2 = Succ[Succ[Zero]]
val zw = ?[ZipWith[_2, Int => String => Boolean]].x // : Stream[Int] => Stream[String] => Stream[Boolean]
// val zw = implicitly[ZipWith[Succ[Succ[Zero]], Int => String => Boolean]{type T = Stream[Int] => Stream[String] => Stream[Boolean]}].x
-} \ No newline at end of file
+}
diff --git a/test/files/pos/depmet_implicit_norm_ret.scala b/test/files/pos/depmet_implicit_norm_ret.scala
index bafd2f7c51..0c587cf164 100644
--- a/test/files/pos/depmet_implicit_norm_ret.scala
+++ b/test/files/pos/depmet_implicit_norm_ret.scala
@@ -1,29 +1,29 @@
object Test{
def ?[S <: AnyRef](implicit w : S) : w.type = w
-
+
// fallback, lower priority (overloading rules apply: pick alternative in subclass lowest in subtyping lattice)
class ZipWithDefault {
implicit def ZeroZipWith[S] = new ZipWith[S] {
type T = Stream[S]
- }
+ }
}
-
+
object ZipWith extends ZipWithDefault {
// def apply[S: ZipWith](s : S) = ?[ZipWith[S]].zipWith(s) // TODO: bug return type should be inferred
def apply[S](s : S)(implicit zw: ZipWith[S]): zw.T = zw.zipWith(s)
implicit def SuccZipWith[S,R](implicit zWith : ZipWith[R]) = new ZipWith[S => R] {
type T = Stream[S] => zWith.T // dependent types replace the associated types functionality
- }
+ }
}
-
+
trait ZipWith[S] {
type T
- def zipWith : S => T = error("")
+ def zipWith : S => T = sys.error("")
}
-
+
// bug: inferred return type = (Stream[A]) => java.lang.Object with Test.ZipWith[B]{type T = Stream[B]}#T
// this seems incompatible with vvvvvvvvvvvvvvvvvvvvvv -- #3731
- def map[A,B](f : A => B) /* : Stream[A] => Stream[B]*/ = ZipWith(f)
- val tst: Stream[Int] = map{x: String => x.length}(Stream("a"))
-} \ No newline at end of file
+ def map[A,B](f : A => B) /* : Stream[A] => Stream[B]*/ = ZipWith(f)
+ val tst: Stream[Int] = map{x: String => x.length}(Stream("a"))
+}
diff --git a/test/files/pos/implicits-new.scala b/test/files/pos/implicits-new.scala
index ffc387132a..7b4f20c6c9 100644
--- a/test/files/pos/implicits-new.scala
+++ b/test/files/pos/implicits-new.scala
@@ -3,9 +3,9 @@ import scala.reflect.{ClassTag, classTag}
// #1435
object t1435 {
- implicit def a(s:String):String = error("")
- implicit def a(i:Int):String = error("")
- implicit def b(i:Int):String = error("")
+ implicit def a(s:String):String = sys.error("")
+ implicit def a(i:Int):String = sys.error("")
+ implicit def b(i:Int):String = sys.error("")
}
class C1435 {
@@ -89,4 +89,4 @@ package foo2709 {
// Problem with specs
object specsProblem {
println(implicitly[TypeTag[Class[_]]])
-} \ No newline at end of file
+}
diff --git a/test/files/pos/implicits-old.scala b/test/files/pos/implicits-old.scala
index 2c01dd0ba8..62ae6b835c 100644
--- a/test/files/pos/implicits-old.scala
+++ b/test/files/pos/implicits-old.scala
@@ -1,8 +1,8 @@
// #1435
object t1435 {
- implicit def a(s:String):String = error("")
- implicit def a(i:Int):String = error("")
- implicit def b(i:Int):String = error("")
+ implicit def a(s:String):String = sys.error("")
+ implicit def a(i:Int):String = sys.error("")
+ implicit def b(i:Int):String = sys.error("")
}
class C1435 {
@@ -45,7 +45,7 @@ object Test1625 {
implicit def byName[A](x: =>A) = new Wrapped(x)
implicit def byVal[A](x: A) = x
-
+
def main(args: Array[String]) = {
// val res:Wrapped = 7 // works
@@ -57,7 +57,7 @@ object Test1625 {
}
object Test2188 {
- implicit def toJavaList[A: ClassManifest](t:collection.Seq[A]):java.util.List[A] = java.util.Arrays.asList(t.toArray:_*)
+ implicit def toJavaList[A: ClassManifest](t:collection.Seq[A]):java.util.List[A] = java.util.Arrays.asList(t.toArray:_*)
val x: java.util.List[String] = List("foo")
}
@@ -67,21 +67,21 @@ object TestNumericWidening {
val x: java.lang.Long = y
}
-// #2709
-package foo2709 {
- class A
- class B
-
- package object bar {
- implicit def a2b(a: A): B = new B
- }
-
- package bar {
- object test {
- new A: B
- }
- }
-}
+// #2709
+package foo2709 {
+ class A
+ class B
+
+ package object bar {
+ implicit def a2b(a: A): B = new B
+ }
+
+ package bar {
+ object test {
+ new A: B
+ }
+ }
+}
// Problem with specs
object specsProblem {
diff --git a/test/files/pos/relax_implicit_divergence.scala b/test/files/pos/relax_implicit_divergence.scala
index 8525c84bab..f17d0239d8 100644
--- a/test/files/pos/relax_implicit_divergence.scala
+++ b/test/files/pos/relax_implicit_divergence.scala
@@ -1,7 +1,7 @@
class A(val options: Seq[String])
object Test {
- implicit def ss: Equiv[Seq[String]] = error("dummy")
- implicit def equivA(implicit seqEq: Equiv[Seq[String]]): Equiv[A] = error("dummy")
+ implicit def ss: Equiv[Seq[String]] = sys.error("dummy")
+ implicit def equivA(implicit seqEq: Equiv[Seq[String]]): Equiv[A] = sys.error("dummy")
implicitly[Equiv[A]]
-} \ No newline at end of file
+}
diff --git a/test/files/pos/simple-exceptions.scala b/test/files/pos/simple-exceptions.scala
index 38f2fc8500..a9f16bf90b 100644
--- a/test/files/pos/simple-exceptions.scala
+++ b/test/files/pos/simple-exceptions.scala
@@ -8,7 +8,7 @@ object Test {
try {
try {
Console.println("hi!")
- error("xx")
+ sys.error("xx")
}
finally Console.println("ho!")
}
diff --git a/test/files/pos/spec-asseenfrom.scala b/test/files/pos/spec-asseenfrom.scala
index cf20fc5ffa..ede5791709 100644
--- a/test/files/pos/spec-asseenfrom.scala
+++ b/test/files/pos/spec-asseenfrom.scala
@@ -1,8 +1,8 @@
-class Automaton[@specialized(Double) W,State] {
+class Automaton[@specialized(Double) W,State] {
- def finalWeight(s: State): W = error("todo");
+ def finalWeight(s: State): W = sys.error("todo");
- def allStates: Set[State] = error("toodo");
+ def allStates: Set[State] = sys.error("toodo");
/**
* Returns a map from states to its final weight. may expand all nodes.
diff --git a/test/files/pos/spec-cyclic.scala b/test/files/pos/spec-cyclic.scala
index b983caa6db..6cd7685370 100644
--- a/test/files/pos/spec-cyclic.scala
+++ b/test/files/pos/spec-cyclic.scala
@@ -6,25 +6,25 @@ trait MyPartialFunction[-A, +B] extends AnyRef with AbsFun[A, B]
trait ColMap[A, +B] extends MyPartialFunction[A, B] /*with Collection[(A, B)] */
-trait ColSorted[K,+A] extends ColRanged[K,A]
+trait ColSorted[K,+A] extends ColRanged[K,A]
-trait ColSortedMap[K,+E] extends ColMap[K,E] with ColSorted[K,Tuple2[K,E]]
+trait ColSortedMap[K,+E] extends ColMap[K,E] with ColSorted[K,Tuple2[K,E]]
trait MutMap[A, B] extends AnyRef
with ColMap[A, B]
-trait ColRanged[K, +A] //extends Iterable[A]
+trait ColRanged[K, +A] //extends Iterable[A]
trait JclRanged[K,A] extends ColRanged[K,A] //with MutableIterable[A] {
-trait JclMap[K,E] extends /*collection.jcl.MutableIterable[Tuple2[K,E]] with*/ MutMap[K,E]
+trait JclMap[K,E] extends /*collection.jcl.MutableIterable[Tuple2[K,E]] with*/ MutMap[K,E]
trait JclSorted[K,A] extends ColSorted[K,A] with JclRanged[K,A]
trait JclSortedMap[K,E] extends ColSortedMap[K,E] with JclMap[K,E] with JclSorted[K,Tuple2[K,E]]
class Foo[A, B] extends JclSortedMap[A, B] {
- def apply(x: A): B = error("NYI")
+ def apply(x: A): B = sys.error("NYI")
}
class Bar {
diff --git a/test/files/pos/spec-sealed.scala b/test/files/pos/spec-sealed.scala
index 5782930899..d7ecfaaabd 100644
--- a/test/files/pos/spec-sealed.scala
+++ b/test/files/pos/spec-sealed.scala
@@ -2,13 +2,13 @@ sealed abstract class MyList[@specialized +A] {
def head: A
def tail: MyList[A]
- def ::[@specialized B >: A](x: B): MyList[B] =
+ def ::[@specialized B >: A](x: B): MyList[B] =
new Cons[B](x, this)
}
case object MyNil extends MyList[Nothing] {
- def head = error("nil")
- def tail = error("nil")
+ def head = sys.error("nil")
+ def tail = sys.error("nil")
}
case class Cons[@specialized a](private val hd: a, tl: MyList[a]) extends MyList[a] {
@@ -19,7 +19,7 @@ case class Cons[@specialized a](private val hd: a, tl: MyList[a]) extends MyList
abstract class IntList extends MyList[Int]
object Main extends App {
- val xs = 1 :: 2 :: 3 :: MyNil
+ val xs = 1 :: 2 :: 3 :: MyNil
println(xs)
}
diff --git a/test/files/pos/spec-sparsearray-new.scala b/test/files/pos/spec-sparsearray-new.scala
index 7b3934c476..df31089fe2 100644
--- a/test/files/pos/spec-sparsearray-new.scala
+++ b/test/files/pos/spec-sparsearray-new.scala
@@ -4,7 +4,7 @@ import scala.collection.mutable.MapLike
class SparseArray[@specialized(Int) T:ClassTag] extends collection.mutable.Map[Int,T] with collection.mutable.MapLike[Int,T,SparseArray[T]] {
override def get(x: Int) = {
val ind = findOffset(x)
- if(ind < 0) None else Some(error("ignore"))
+ if(ind < 0) None else Some(sys.error("ignore"))
}
/**
@@ -13,13 +13,13 @@ class SparseArray[@specialized(Int) T:ClassTag] extends collection.mutable.Map[I
* negative and can be converted into an insertion point with -(rv+1).
*/
private def findOffset(i : Int) : Int = {
- error("impl doesn't matter")
+ sys.error("impl doesn't matter")
}
- override def apply(i : Int) : T = { error("ignore") }
- override def update(i : Int, value : T) = error("ignore")
+ override def apply(i : Int) : T = { sys.error("ignore") }
+ override def update(i : Int, value : T) = sys.error("ignore")
override def empty = new SparseArray[T]
- def -=(ind: Int) = error("ignore")
- def +=(kv: (Int,T)) = error("ignore")
- override final def iterator = error("ignore")
-} \ No newline at end of file
+ def -=(ind: Int) = sys.error("ignore")
+ def +=(kv: (Int,T)) = sys.error("ignore")
+ override final def iterator = sys.error("ignore")
+}
diff --git a/test/files/pos/spec-sparsearray-old.scala b/test/files/pos/spec-sparsearray-old.scala
index ea7710a785..e10dabd542 100644
--- a/test/files/pos/spec-sparsearray-old.scala
+++ b/test/files/pos/spec-sparsearray-old.scala
@@ -3,7 +3,7 @@ import scala.collection.mutable.MapLike
class SparseArray[@specialized(Int) T:ClassManifest] extends collection.mutable.Map[Int,T] with collection.mutable.MapLike[Int,T,SparseArray[T]] {
override def get(x: Int) = {
val ind = findOffset(x)
- if(ind < 0) None else Some(error("ignore"))
+ if(ind < 0) None else Some(sys.error("ignore"))
}
/**
@@ -12,13 +12,13 @@ class SparseArray[@specialized(Int) T:ClassManifest] extends collection.mutable.
* negative and can be converted into an insertion point with -(rv+1).
*/
private def findOffset(i : Int) : Int = {
- error("impl doesn't matter")
+ sys.error("impl doesn't matter")
}
- override def apply(i : Int) : T = { error("ignore") }
- override def update(i : Int, value : T) = error("ignore")
+ override def apply(i : Int) : T = { sys.error("ignore") }
+ override def update(i : Int, value : T) = sys.error("ignore")
override def empty = new SparseArray[T]
- def -=(ind: Int) = error("ignore")
- def +=(kv: (Int,T)) = error("ignore")
- override final def iterator = error("ignore")
+ def -=(ind: Int) = sys.error("ignore")
+ def +=(kv: (Int,T)) = sys.error("ignore")
+ override final def iterator = sys.error("ignore")
}
diff --git a/test/files/pos/spec-traits.scala b/test/files/pos/spec-traits.scala
index c6cc2921b7..074f6c3d3c 100644
--- a/test/files/pos/spec-traits.scala
+++ b/test/files/pos/spec-traits.scala
@@ -11,19 +11,19 @@ class Lazy {
// issue 3307
class Bug3307 {
- def f[Z](block: String => Z) {
- block("abc")
+ def f[Z](block: String => Z) {
+ block("abc")
}
-
- ({ () =>
- f { implicit x => println(x) } })()
+
+ ({ () =>
+ f { implicit x => println(x) } })()
}
// issue 3301
trait T[X]
class Bug3301 {
- def t[A]: T[A] = error("stub")
+ def t[A]: T[A] = sys.error("stub")
() => {
type X = Int
diff --git a/test/files/pos/t0031.scala b/test/files/pos/t0031.scala
index ec6eae9282..d4050c8184 100644
--- a/test/files/pos/t0031.scala
+++ b/test/files/pos/t0031.scala
@@ -4,17 +4,17 @@ object Main {
def ensure(postcondition: a => Boolean): a
}
- def require[a](precondition: => Boolean)(command: => a): Ensure[a] =
+ def require[a](precondition: => Boolean)(command: => a): Ensure[a] =
if (precondition)
new Ensure[a] {
def ensure(postcondition: a => Boolean): a = {
val result = command;
if (postcondition(result)) result
- else error("Assertion error")
+ else sys.error("Assertion error")
}
}
else
- error("Assertion error");
+ sys.error("Assertion error");
def arb[a](s: List[a]) =
require (! s.isEmpty) {
diff --git a/test/files/pos/t0227.scala b/test/files/pos/t0227.scala
index 8650350c4a..806b20d409 100644
--- a/test/files/pos/t0227.scala
+++ b/test/files/pos/t0227.scala
@@ -5,7 +5,7 @@ final class Settings {
abstract class Factory {
type libraryType <: Base
- final def apply(settings: Settings): libraryType = error("bla")
+ final def apply(settings: Settings): libraryType = sys.error("bla")
}
abstract class Base {
@@ -19,7 +19,7 @@ class SA(val settings: Settings) extends Base {
SD
) ::: settings.f(
SC
- )
+ )
}
object SC extends Factory {
diff --git a/test/files/pos/t2331.scala b/test/files/pos/t2331.scala
index 9a15b5c2a9..a7f80ac98e 100644
--- a/test/files/pos/t2331.scala
+++ b/test/files/pos/t2331.scala
@@ -4,8 +4,8 @@ trait C {
object Test {
val o /*: C --> no crash*/ = new C {
- def m[T]: Nothing /*: T --> no crash*/ = error("omitted")
+ def m[T]: Nothing /*: T --> no crash*/ = sys.error("omitted")
}
o.m[Nothing]
-} \ No newline at end of file
+}
diff --git a/test/files/pos/t2421.scala b/test/files/pos/t2421.scala
index 26e485c160..2544a1cb36 100644
--- a/test/files/pos/t2421.scala
+++ b/test/files/pos/t2421.scala
@@ -1,14 +1,14 @@
object Test {
abstract class <~<[-From, +To] extends (From => To)
- implicit def trivial[A]: A <~< A = error("")
+ implicit def trivial[A]: A <~< A = sys.error("")
trait Forcible[T]
- implicit val forcibleInt: (Int <~< Forcible[Int]) = error("")
+ implicit val forcibleInt: (Int <~< Forcible[Int]) = sys.error("")
- def headProxy[P <: Forcible[Int]](implicit w: Int <~< P): P = error("")
-
- headProxy
- // trivial[Int] should not be considered a valid implicit, since w would have type Int <~< Int,
+ def headProxy[P <: Forcible[Int]](implicit w: Int <~< P): P = sys.error("")
+
+ headProxy
+ // trivial[Int] should not be considered a valid implicit, since w would have type Int <~< Int,
// and headProxy's type parameter P cannot be instantiated to Int
-} \ No newline at end of file
+}
diff --git a/test/files/pos/t2429.scala b/test/files/pos/t2429.scala
index 3ea3f9e2a5..550681b6a2 100755
--- a/test/files/pos/t2429.scala
+++ b/test/files/pos/t2429.scala
@@ -1,10 +1,10 @@
object Msg {
trait T
-
+
trait TSeq
-
+
object TSeq {
- implicit def fromSeq(s: Seq[T]): TSeq = error("stub")
+ implicit def fromSeq(s: Seq[T]): TSeq = sys.error("stub")
}
def render {
@@ -12,7 +12,7 @@ object Msg {
case (a, b) => {
a match {
case _ => b match {
- case _ => error("stub")
+ case _ => sys.error("stub")
}
}
}
@@ -20,6 +20,6 @@ object Msg {
}
}
object Oops {
- implicit def someImplicit(s: Seq[_]): String = error("stub")
+ implicit def someImplicit(s: Seq[_]): String = sys.error("stub")
def item: String = Nil map { case e: Any => e }
}
diff --git a/test/files/pos/t2797.scala b/test/files/pos/t2797.scala
index 4323664e91..cf579d8de4 100644
--- a/test/files/pos/t2797.scala
+++ b/test/files/pos/t2797.scala
@@ -1,9 +1,9 @@
class MyVector[A] {
- def map[B](f: A => B): MyVector[B] = error("")
+ def map[B](f: A => B): MyVector[B] = sys.error("")
}
object Test {
def unzip[B, C](_this: MyVector[(B, C)]): (MyVector[B], MyVector[C]) = {
(_this.map{ bc => bc._1 }, _this.map{ bc => bc._2 })
}
-} \ No newline at end of file
+}
diff --git a/test/files/pos/t3152.scala b/test/files/pos/t3152.scala
index a20428dbee..3d1dcbd6f0 100644
--- a/test/files/pos/t3152.scala
+++ b/test/files/pos/t3152.scala
@@ -1,13 +1,13 @@
trait Applicative[M[_]]
sealed trait MA[M[_], A] {
- def sequence[N[_], B](implicit a: A <:< N[B], n: Applicative[N]): N[M[B]] = error("stub")
- // def sequence3[N[_], B]()(implicit a: A <:< N[B], n: Applicative[N]): N[M[B]] = error("stub")
+ def sequence[N[_], B](implicit a: A <:< N[B], n: Applicative[N]): N[M[B]] = sys.error("stub")
+ // def sequence3[N[_], B]()(implicit a: A <:< N[B], n: Applicative[N]): N[M[B]] = sys.error("stub")
}
object test {
- implicit def ListMA[A](l: List[A]): MA[List, A] = error("stub")
- implicit val ao: Applicative[Option] = error("stub")
+ implicit def ListMA[A](l: List[A]): MA[List, A] = sys.error("stub")
+ implicit val ao: Applicative[Option] = sys.error("stub")
/* This compiles OK:
(Nil: List[Option[Int]]).sequence3(): Option[List[Int]]
@@ -17,4 +17,4 @@ object test {
// !!! No line number is reported with the error
(Nil: List[Option[Int]]).sequence: Option[List[Int]]
(List[Option[Int]]()).sequence: Option[List[Int]]
-} \ No newline at end of file
+}
diff --git a/test/files/pos/t3252.scala b/test/files/pos/t3252.scala
index 4b8e862714..3ecc1e7cef 100644
--- a/test/files/pos/t3252.scala
+++ b/test/files/pos/t3252.scala
@@ -8,8 +8,8 @@ class A {
}
}
- private def g[T](block : => T) = error("")
+ private def g[T](block : => T) = sys.error("")
}
object B {
- def h(block : => Unit) : Nothing = error("")
-} \ No newline at end of file
+ def h(block : => Unit) : Nothing = sys.error("")
+}
diff --git a/test/files/pos/t3349/Test.scala b/test/files/pos/t3349/Test.scala
index 8174e4c4f8..595beadc20 100644
--- a/test/files/pos/t3349/Test.scala
+++ b/test/files/pos/t3349/Test.scala
@@ -1,5 +1,5 @@
object Test {
val label = "name"
- val table: Table = error("")
+ val table: Table = sys.error("")
table.addColumn( label, label.getClass )
-} \ No newline at end of file
+}
diff --git a/test/files/pos/t3363-new.scala b/test/files/pos/t3363-new.scala
index e609f4d55f..fef2bf8a72 100644
--- a/test/files/pos/t3363-new.scala
+++ b/test/files/pos/t3363-new.scala
@@ -9,7 +9,7 @@ object TestCase {
//if you inherit from MapOps[T] instead of MapOps[F] then code compiles fine
implicit def map2ops[T,F](fs: Map[T,F]) = new MapOps[F] {
//if you remove this line, then code compiles
- lazy val m: TypeTag[T] = error("just something to make it compile")
+ lazy val m: TypeTag[T] = sys.error("just something to make it compile")
def is(xs: List[T]) = List(xs)
}
@@ -17,4 +17,4 @@ object TestCase {
println(Map(1 -> "2") is List(2))
}
- } \ No newline at end of file
+ }
diff --git a/test/files/pos/t3363-old.scala b/test/files/pos/t3363-old.scala
index bae54084ea..c08cf2a6b6 100644
--- a/test/files/pos/t3363-old.scala
+++ b/test/files/pos/t3363-old.scala
@@ -7,7 +7,7 @@ object TestCase {
//if you inherit from MapOps[T] instead of MapOps[F] then code compiles fine
implicit def map2ops[T,F](fs: Map[T,F]) = new MapOps[F] {
//if you remove this line, then code compiles
- lazy val m: Manifest[T] = error("just something to make it compile")
+ lazy val m: Manifest[T] = sys.error("just something to make it compile")
def is(xs: List[T]) = List(xs)
}
diff --git a/test/files/pos/t3440.scala b/test/files/pos/t3440.scala
index 46bba1b207..0e7ca6b70f 100644
--- a/test/files/pos/t3440.scala
+++ b/test/files/pos/t3440.scala
@@ -4,15 +4,15 @@ object test {
}
case object Int8 extends SampleFormat1 {
- def readerFactory = error("")
+ def readerFactory = sys.error("")
}
case object Int16 extends SampleFormat1 {
- def readerFactory = error("")
+ def readerFactory = sys.error("")
}
-
+
(new {}: Any) match {
case 8 => Int8
case 16 => Int16
- case _ => error("")
+ case _ => sys.error("")
}
-} \ No newline at end of file
+}
diff --git a/test/files/pos/t3477.scala b/test/files/pos/t3477.scala
index 660aa55736..6a94baa6c8 100644
--- a/test/files/pos/t3477.scala
+++ b/test/files/pos/t3477.scala
@@ -1,7 +1,7 @@
class J3 {
- def f[K, K1 >: K, V](x: Map[K1, V]): Map[K, V] = error("")
+ def f[K, K1 >: K, V](x: Map[K1, V]): Map[K, V] = sys.error("")
}
object Test {
(new J3).f(Map[Int, Int]())
-} \ No newline at end of file
+}
diff --git a/test/files/pos/t3731.scala b/test/files/pos/t3731.scala
index 75938540c0..7a3cbec0f4 100644
--- a/test/files/pos/t3731.scala
+++ b/test/files/pos/t3731.scala
@@ -1,8 +1,8 @@
object Test{
trait ZW[S]{type T}
- def ZipWith[S, M <: ZW[S]]: M#T = error("ZW")
+ def ZipWith[S, M <: ZW[S]]: M#T = sys.error("ZW")
- // meh must be parameterised to force an asSeenFrom that
+ // meh must be parameterised to force an asSeenFrom that
// duplicates the refinement in the TR's pre without updating its sym
def meh[A] = ZipWith[A, ZW[A]{type T=Stream[A]}]
diff --git a/test/files/pos/t3883.scala b/test/files/pos/t3883.scala
index adde0526b2..1b62c0c6d6 100644
--- a/test/files/pos/t3883.scala
+++ b/test/files/pos/t3883.scala
@@ -1,14 +1,14 @@
// need to test both orders
object A1 {
- implicit def i: Equiv[Boolean] = error("")
- implicit def div[T, A](implicit f: T => A, eq: Equiv[A]): Equiv[T] = error("")
+ implicit def i: Equiv[Boolean] = sys.error("")
+ implicit def div[T, A](implicit f: T => A, eq: Equiv[A]): Equiv[T] = sys.error("")
implicitly[Equiv[Boolean]]
}
object A2 {
- implicit def div[T, A](implicit f: T => A, eq: Equiv[A]): Equiv[T] = error("")
- implicit def i: Equiv[Boolean] = error("")
+ implicit def div[T, A](implicit f: T => A, eq: Equiv[A]): Equiv[T] = sys.error("")
+ implicit def i: Equiv[Boolean] = sys.error("")
implicitly[Equiv[Boolean]]
}
diff --git a/test/files/pos/t3927.scala b/test/files/pos/t3927.scala
index eb4c4b3be5..f5869c55d5 100644
--- a/test/files/pos/t3927.scala
+++ b/test/files/pos/t3927.scala
@@ -1,6 +1,6 @@
object A {
def x {
- implicit lazy val e: Equiv[Int] = error("")
+ implicit lazy val e: Equiv[Int] = sys.error("")
implicitly[Equiv[Int]]
}
-}
+}
diff --git a/test/files/pos/tcpoly_boundedmonad.scala b/test/files/pos/tcpoly_boundedmonad.scala
index 24a911769b..8c605dc7b6 100644
--- a/test/files/pos/tcpoly_boundedmonad.scala
+++ b/test/files/pos/tcpoly_boundedmonad.scala
@@ -1,19 +1,19 @@
trait Monad[T <: Bound[T], MyType[x <: Bound[x]], Bound[_]] {
- def map[S <: Bound[S]](f: T => S): MyType[S]
+ def map[S <: Bound[S]](f: T => S): MyType[S]
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
- (f: T => Result[S]): Result[S]
+ (f: T => Result[S]): Result[S]
def filter(p: T => Boolean): MyType[T]
}
class Set[T <: Ordered[T]] extends Monad[T, Set, Ordered] {
- def map[S <: Ordered[S]](f: T => S): Set[S] = error("TODO")
-
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ def map[S <: Ordered[S]](f: T => S): Set[S] = sys.error("TODO")
+
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
- (f: T => Result[S]): Result[S] = error("TODO")
-
- def filter(p: T => Boolean): Set[T] = error("TODO")
+ (f: T => Result[S]): Result[S] = sys.error("TODO")
+
+ def filter(p: T => Boolean): Set[T] = sys.error("TODO")
}
diff --git a/test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala b/test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala
index 97594d506d..f719972a17 100644
--- a/test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala
+++ b/test/files/pos/tcpoly_infer_explicit_tuple_wrapper.scala
@@ -2,15 +2,15 @@ import scala.collection.generic.GenericTraversableTemplate
import scala.collection.Iterable
class IterableOps[CC[+B] <: Iterable[B] with GenericTraversableTemplate[B, CC], A1, A2](tuple: (CC[A1], Iterable[A2])) {
- def unzip: (CC[A1], CC[A2]) = error("foo")
+ def unzip: (CC[A1], CC[A2]) = sys.error("foo")
}
object Test {
- implicit def tupleOfIterableWrapper[CC[+B] <: Iterable[B] with GenericTraversableTemplate[B, CC], A1, A2](tuple: (CC[A1], Iterable[A2]))
+ implicit def tupleOfIterableWrapper[CC[+B] <: Iterable[B] with GenericTraversableTemplate[B, CC], A1, A2](tuple: (CC[A1], Iterable[A2]))
= new IterableOps[CC, A1, A2](tuple)
-
+
val t = (List(1, 2, 3), List(6, 5, 4))
tupleOfIterableWrapper(t) unzip
-} \ No newline at end of file
+}
diff --git a/test/files/pos/tcpoly_infer_implicit_tuple_wrapper.scala b/test/files/pos/tcpoly_infer_implicit_tuple_wrapper.scala
index 3073b298de..19243505b4 100644
--- a/test/files/pos/tcpoly_infer_implicit_tuple_wrapper.scala
+++ b/test/files/pos/tcpoly_infer_implicit_tuple_wrapper.scala
@@ -2,7 +2,7 @@ import scala.collection.generic.GenericTraversableTemplate
import scala.collection.Iterable
class IterableOps[CC[+B] <: Iterable[B] with GenericTraversableTemplate[B, CC], A1, A2](tuple: (CC[A1], Iterable[A2])) {
- def unzip: (CC[A1], CC[A2]) = error("foo")
+ def unzip: (CC[A1], CC[A2]) = sys.error("foo")
}
object Test {
@@ -15,4 +15,4 @@ object Test {
tupleOfIterableWrapper(t) unzip
t unzip
-} \ No newline at end of file
+}
diff --git a/test/files/pos/tcpoly_overloaded.scala b/test/files/pos/tcpoly_overloaded.scala
index 4240074d85..4f6334685b 100644
--- a/test/files/pos/tcpoly_overloaded.scala
+++ b/test/files/pos/tcpoly_overloaded.scala
@@ -1,10 +1,10 @@
trait Monad[T <: Bound[T], MyType[x <: Bound[x]], Bound[_]] {
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
- (f: T => Result[S]): Result[S]
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ (f: T => Result[S]): Result[S]
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
- (f: T => Result[S], foo: String): Result[S]
+ (f: T => Result[S], foo: String): Result[S]
def flatMap[S <: Bound[S]]
(f: T => MyType[S], foo: Int): MyType[S]
}
@@ -12,14 +12,14 @@ trait Monad[T <: Bound[T], MyType[x <: Bound[x]], Bound[_]] {
trait Test {
def moo: MList[Int]
class MList[T](el: T) extends Monad[T, List, Any] {
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
- (f: T => Result[S]): Result[S] = error("foo")
- def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
+ (f: T => Result[S]): Result[S] = sys.error("foo")
+ def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_],
Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]]
- (f: T => Result[S], foo: String): Result[S] = error("foo")
+ (f: T => Result[S], foo: String): Result[S] = sys.error("foo")
def flatMap[S]
- (f: T => List[S], foo: Int): List[S] = error("foo")
+ (f: T => List[S], foo: Int): List[S] = sys.error("foo")
}
val l: MList[String] = moo.flatMap[String, List, Any, MList]((x: Int) => new MList("String"))
}
diff --git a/test/files/pos/tcpoly_subst.scala b/test/files/pos/tcpoly_subst.scala
index f8ddb9a715..88cc4d0610 100644
--- a/test/files/pos/tcpoly_subst.scala
+++ b/test/files/pos/tcpoly_subst.scala
@@ -1,4 +1,4 @@
object test {
- def make[m[x], b]: m[b] = error("foo")
+ def make[m[x], b]: m[b] = sys.error("foo")
val lst: List[Int] = make[List, Int]
}
diff --git a/test/files/pos/tcpoly_variance_pos.scala b/test/files/pos/tcpoly_variance_pos.scala
index b641716d50..b63abce202 100644
--- a/test/files/pos/tcpoly_variance_pos.scala
+++ b/test/files/pos/tcpoly_variance_pos.scala
@@ -1,7 +1,7 @@
class A[m[+x]] {
- def str: m[Object] = error("foo")
+ def str: m[Object] = sys.error("foo")
}
class B[m[+x]] extends A[m] {
- override def str: m[String] = error("foo")
+ override def str: m[String] = sys.error("foo")
}
diff --git a/test/files/pos/tcpoly_wildcards.scala b/test/files/pos/tcpoly_wildcards.scala
index d3bb86b591..f6d1b666d0 100644
--- a/test/files/pos/tcpoly_wildcards.scala
+++ b/test/files/pos/tcpoly_wildcards.scala
@@ -1,3 +1,3 @@
trait test[b[_,_]] {
- def moo[a[_, _]] = error("a")
+ def moo[a[_, _]] = sys.error("a")
}
diff --git a/test/files/pos/typealias_dubious.scala b/test/files/pos/typealias_dubious.scala
index 587453a037..cdba1a64d0 100644
--- a/test/files/pos/typealias_dubious.scala
+++ b/test/files/pos/typealias_dubious.scala
@@ -1,15 +1,15 @@
class MailBox {
- //class Message
+ //class Message
type Message = AnyRef
-}
-
+}
+
abstract class Actor {
private val in = new MailBox
- def send(msg: in.Message) = error("foo")
+ def send(msg: in.Message) = sys.error("foo")
- def unstable: Actor = error("foo")
+ def unstable: Actor = sys.error("foo")
- def dubiousSend(msg: MailBox#Message) =
+ def dubiousSend(msg: MailBox#Message) =
unstable.send(msg) // in.Message becomes unstable.Message, but that's ok since Message is a concrete type member
-}
+}
diff --git a/test/files/pos/virtpatmat_binding_opt.scala b/test/files/pos/virtpatmat_binding_opt.scala
index 962e3d7dbe..8ec931fe78 100644
--- a/test/files/pos/virtpatmat_binding_opt.scala
+++ b/test/files/pos/virtpatmat_binding_opt.scala
@@ -4,8 +4,8 @@ class Test {
case that: Test2 =>
println(that)
this
- case _ => error("meh")
+ case _ => sys.error("meh")
}
}
-class Test2 extends Test \ No newline at end of file
+class Test2 extends Test