summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-12 02:49:08 +0000
committerPaul Phillips <paulp@improving.org>2011-01-12 02:49:08 +0000
commit5bada810b4c7eda186aa40b94a78326520b3fa92 (patch)
treeeee2227bf7f53a6b04e9732d887961b403975ab5 /test/files/neg
parent566fefb05abe31e90f765d1fb0a89b264302d9ce (diff)
downloadscala-5bada810b4c7eda186aa40b94a78326520b3fa92.tar.gz
scala-5bada810b4c7eda186aa40b94a78326520b3fa92.tar.bz2
scala-5bada810b4c7eda186aa40b94a78326520b3fa92.zip
Imported sbt.Process into trunk, in the guise o...
Imported sbt.Process into trunk, in the guise of package scala.sys.process. It is largely indistinguishable from the version in sbt, at least from the outside. Also, I renamed package system to sys. I wanted to do that from the beginning and the desire has only grown since then. Sometimes a short identifier is just critical to usability: with a function like error("") called from hundreds of places, the difference between system.error and sys.error is too big. sys.error and sys.exit have good vibes (at least as good as the vibes can be for functions which error and exit.) Note: this is just the first cut. I need to check this in to finish fixing partest. I will be going over it with a comb and writing documentation which will leave you enchanted, as well as removing other bits which are now redundant or inferior. No review.
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/found-req-variance.scala4
-rw-r--r--test/files/neg/tailrec-2.scala6
-rw-r--r--test/files/neg/tcpoly_variance.check2
-rw-r--r--test/files/neg/tcpoly_variance.scala4
-rw-r--r--test/files/neg/tcpoly_variance_enforce.check4
-rw-r--r--test/files/neg/tcpoly_variance_enforce.scala4
6 files changed, 12 insertions, 12 deletions
diff --git a/test/files/neg/found-req-variance.scala b/test/files/neg/found-req-variance.scala
index c44d021fac..024b24c367 100644
--- a/test/files/neg/found-req-variance.scala
+++ b/test/files/neg/found-req-variance.scala
@@ -42,7 +42,7 @@ object Test {
object Functions {
object Set1 {
def f[T, R](x: FF1[T, R]) = ()
- def h[T, R] : FF1[T, R] = system.error("")
+ def h[T, R] : FF1[T, R] = sys.error("")
def ff1 = f[B, B](h[A, A]) // fail
def ff2 = f[B, B](h[B, A]) // fail
@@ -56,7 +56,7 @@ object Functions {
}
object Set2 {
def f[T, R](x: FF2[T, R]) = ()
- def h[T, R] : FF2[T, R] = system.error("")
+ def h[T, R] : FF2[T, R] = sys.error("")
def ff1 = f[B, B](h[A, A]) // suggest
def ff2 = f[B, B](h[B, A]) // suggest
diff --git a/test/files/neg/tailrec-2.scala b/test/files/neg/tailrec-2.scala
index 0d446364fd..342cd85323 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] = system.error("")
+ def f[T] : Bop4[T] = sys.error("")
}
object Bop {
- def m1[A] : Super[A] = system.error("")
- def m2[A] : Bop2[A] = system.error("")
+ def m1[A] : Super[A] = sys.error("")
+ def m2[A] : Bop2[A] = sys.error("")
} \ No newline at end of file
diff --git a/test/files/neg/tcpoly_variance.check b/test/files/neg/tcpoly_variance.check
index dfe48f9544..0695fa09a1 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] = system.error("foo") // since x in m[x] is invariant, ! m[String] <: m[Object]
+ override def str: m[String] = sys.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 04846e81d8..4b9bd50e08 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] = system.error("foo")
+ def str: m[Object] = sys.error("foo")
}
class B[m[x]] extends A[m] {
- override def str: m[String] = system.error("foo") // since x in m[x] is invariant, ! m[String] <: m[Object]
+ override def str: m[String] = sys.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 48025889fc..44b5b2c15c 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] = system.error("foo") // error
+ def x: coll[FooInvar] = sys.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] = system.error("foo") // error
+ def y: coll[FooContra] = sys.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 cbc8ad7c66..ddff0e9f94 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] = system.error("foo") // error
- def y: coll[FooContra] = system.error("foo") // error
+ def x: coll[FooInvar] = sys.error("foo") // error
+ def y: coll[FooContra] = sys.error("foo") // error
}