diff options
author | Paul Phillips <paulp@improving.org> | 2010-12-04 19:33:47 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-12-04 19:33:47 +0000 |
commit | 32ca2f2be6a027e2112bc1f8e10f99571caa4a8c (patch) | |
tree | 6d0fe6cfac2815088cfe09fe9bb23089109fc337 /test | |
parent | b1e969a11b2b24f5883198dc0b90d9ab5513498b (diff) | |
download | scala-32ca2f2be6a027e2112bc1f8e10f99571caa4a8c.tar.gz scala-32ca2f2be6a027e2112bc1f8e10f99571caa4a8c.tar.bz2 scala-32ca2f2be6a027e2112bc1f8e10f99571caa4a8c.zip |
Introducing scala.system, the product of a whir...
Introducing scala.system, the product of a whirlwind couple of
hours. More useful stuff than you can shake three sticks at. See the
scala.system package object. It's even documented.
And since it has methods error and exit, proceeded to deprecate the ones
in Predef. No review.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/tailrec-2.scala | 6 | ||||
-rw-r--r-- | test/files/neg/tcpoly_variance.check | 2 | ||||
-rw-r--r-- | test/files/neg/tcpoly_variance.scala | 4 | ||||
-rw-r--r-- | test/files/neg/tcpoly_variance_enforce.check | 4 | ||||
-rw-r--r-- | test/files/neg/tcpoly_variance_enforce.scala | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/test/files/neg/tailrec-2.scala b/test/files/neg/tailrec-2.scala index 4388815a06..0d446364fd 100644 --- a/test/files/neg/tailrec-2.scala +++ b/test/files/neg/tailrec-2.scala @@ -17,10 +17,10 @@ class Bop4[+A](val element: A) extends Super[A] { } object Other { - def f[T] : Bop4[T] = error("") + def f[T] : Bop4[T] = system.error("") } object Bop { - def m1[A] : Super[A] = error("") - def m2[A] : Bop2[A] = error("") + def m1[A] : Super[A] = system.error("") + def m2[A] : Bop2[A] = system.error("") }
\ No newline at end of file diff --git a/test/files/neg/tcpoly_variance.check b/test/files/neg/tcpoly_variance.check index 2df4b4d429..dfe48f9544 100644 --- a/test/files/neg/tcpoly_variance.check +++ b/test/files/neg/tcpoly_variance.check @@ -1,5 +1,5 @@ tcpoly_variance.scala:6: error: overriding method str in class A of type => m[java.lang.Object]; method str has incompatible type - override def str: m[String] = error("foo") // since x in m[x] is invariant, ! m[String] <: m[Object] + override def str: m[String] = system.error("foo") // since x in m[x] is invariant, ! m[String] <: m[Object] ^ one error found diff --git a/test/files/neg/tcpoly_variance.scala b/test/files/neg/tcpoly_variance.scala index 52c1452162..04846e81d8 100644 --- a/test/files/neg/tcpoly_variance.scala +++ b/test/files/neg/tcpoly_variance.scala @@ -1,7 +1,7 @@ class A[m[x]] { - def str: m[Object] = error("foo") + def str: m[Object] = system.error("foo") } class B[m[x]] extends A[m] { - override def str: m[String] = error("foo") // since x in m[x] is invariant, ! m[String] <: m[Object] + override def str: m[String] = system.error("foo") // since x in m[x] is invariant, ! m[String] <: m[Object] } diff --git a/test/files/neg/tcpoly_variance_enforce.check b/test/files/neg/tcpoly_variance_enforce.check index 508ed90fbb..48025889fc 100644 --- a/test/files/neg/tcpoly_variance_enforce.check +++ b/test/files/neg/tcpoly_variance_enforce.check @@ -36,10 +36,10 @@ object fcoll4_2 extends coll4[FooString, Any] // error ^ tcpoly_variance_enforce.scala:37: error: kinds of the type arguments (FooInvar) do not conform to the expected kinds of the type parameters (type m) in trait coll. FooInvar's type parameters do not match type m's expected parameters: type x (in class FooInvar) is invariant, but type x is declared covariant - def x: coll[FooInvar] = error("foo") // error + def x: coll[FooInvar] = system.error("foo") // error ^ tcpoly_variance_enforce.scala:38: error: kinds of the type arguments (FooContra) do not conform to the expected kinds of the type parameters (type m) in trait coll. FooContra's type parameters do not match type m's expected parameters: type x (in class FooContra) is contravariant, but type x is declared covariant - def y: coll[FooContra] = error("foo") // error + def y: coll[FooContra] = system.error("foo") // error ^ 11 errors found diff --git a/test/files/neg/tcpoly_variance_enforce.scala b/test/files/neg/tcpoly_variance_enforce.scala index f3962d6757..cbc8ad7c66 100644 --- a/test/files/neg/tcpoly_variance_enforce.scala +++ b/test/files/neg/tcpoly_variance_enforce.scala @@ -34,8 +34,8 @@ object fcoll4_2 extends coll4[FooString, Any] // error object test { var ok: coll[FooCov] = _ - def x: coll[FooInvar] = error("foo") // error - def y: coll[FooContra] = error("foo") // error + def x: coll[FooInvar] = system.error("foo") // error + def y: coll[FooContra] = system.error("foo") // error } |