summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2007-04-16 11:23:30 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2007-04-16 11:23:30 +0000
commit24eb581d805653215fce5f931f78789e31924800 (patch)
tree3c0690df90110449a36a10461cae0260fca7ca74 /test
parent3d9d369b7147f3933cce9932d2914f68d39418c3 (diff)
downloadscala-24eb581d805653215fce5f931f78789e31924800.tar.gz
scala-24eb581d805653215fce5f931f78789e31924800.tar.bz2
scala-24eb581d805653215fce5f931f78789e31924800.zip
implementing Martin's suggestions for tcpoly
- prefixString in SingleType suppresses scala.Predef prefixes - (sym.isPredefModule) better handling of double defs of `_' in type - params (now in enterInScope in Namers) introduced HKmode to indicate - we're typing a higher-kinded type, instead of reusing POLYmode | - TAPPmode - Typers.typedTypeConstructor does not normalize the result anymore -- now in GenICode generatedType = toTypeKind(tpt.tpe.normalize)
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/accesses.check8
-rw-r--r--test/files/neg/bug521.check6
-rw-r--r--test/files/neg/bug588.check4
-rw-r--r--test/files/neg/bug752.check2
-rw-r--r--test/files/neg/bug856.check2
-rw-r--r--test/files/neg/bug900.check2
-rw-r--r--test/files/neg/bug910.check2
-rw-r--r--test/files/neg/implicits.check2
-rw-r--r--test/files/neg/overload.check2
-rw-r--r--test/files/neg/tcpoly_typealias.check2
-rw-r--r--test/files/neg/tcpoly_variance.check2
-rw-r--r--test/files/neg/tcpoly_variance_enforce.check10
12 files changed, 22 insertions, 22 deletions
diff --git a/test/files/neg/accesses.check b/test/files/neg/accesses.check
index 8b8856370b..2fa78ffc50 100644
--- a/test/files/neg/accesses.check
+++ b/test/files/neg/accesses.check
@@ -1,16 +1,16 @@
-accesses.scala:23: error: error overriding method f2 in class A of type => scala.Predef.unit;
+accesses.scala:23: error: error overriding method f2 in class A of type => unit;
method f2 has weaker access privileges; it should not be private
private def f2: unit = ()
^
-accesses.scala:24: error: error overriding method f3 in class A of type => scala.Predef.unit;
+accesses.scala:24: error: error overriding method f3 in class A of type => unit;
method f3 has weaker access privileges; it should be at least protected
private[p2] def f3: unit = ()
^
-accesses.scala:25: error: error overriding method f4 in class A of type => scala.Predef.unit;
+accesses.scala:25: error: error overriding method f4 in class A of type => unit;
method f4 has weaker access privileges; it should be at least private[p1]
private[p2] def f4: unit
^
-accesses.scala:26: error: error overriding method f5 in class A of type => scala.Predef.unit;
+accesses.scala:26: error: error overriding method f5 in class A of type => unit;
method f5 has weaker access privileges; it should be at least protected[p1]
protected[p2] def f5: unit
^
diff --git a/test/files/neg/bug521.check b/test/files/neg/bug521.check
index d058d2971e..80a1931231 100644
--- a/test/files/neg/bug521.check
+++ b/test/files/neg/bug521.check
@@ -1,14 +1,14 @@
-bug521.scala:10: error: class PlainFile needs to be abstract, since method path in class AbstractFile of type => scala.Predef.String is not defined
+bug521.scala:10: error: class PlainFile needs to be abstract, since method path in class AbstractFile of type => String is not defined
class PlainFile(val file : File) extends AbstractFile {}
^
bug521.scala:13: error: error overriding value file in class PlainFile of type java.io.File;
value file needs `override' modifier
final class ZipArchive(val file : File, archive : ZipFile) extends PlainFile(file) {
^
-bug521.scala:13: error: class ZipArchive needs to be abstract, since method path in class AbstractFile of type => scala.Predef.String is not defined
+bug521.scala:13: error: class ZipArchive needs to be abstract, since method path in class AbstractFile of type => String is not defined
final class ZipArchive(val file : File, archive : ZipFile) extends PlainFile(file) {
^
-bug521.scala:15: error: error overriding value path in class VirtualFile of type scala.Predef.String;
+bug521.scala:15: error: error overriding value path in class VirtualFile of type String;
method path needs to be an immutable value
override def path = "";
^
diff --git a/test/files/neg/bug588.check b/test/files/neg/bug588.check
index 648484176e..f652292a2c 100644
--- a/test/files/neg/bug588.check
+++ b/test/files/neg/bug588.check
@@ -1,6 +1,6 @@
bug588.scala:3: error: double definition:
-method visit:((scala.Predef.int) => scala.Predef.String)scala.Predef.boolean and
-method visit:((scala.Predef.int) => scala.Predef.unit)scala.Predef.boolean at line 2
+method visit:((int) => String)boolean and
+method visit:((int) => unit)boolean at line 2
have same type after erasure: (scala.Function1)scala.Boolean
def visit(f: int => String): boolean
^
diff --git a/test/files/neg/bug752.check b/test/files/neg/bug752.check
index e240dbdfe2..5eddaf2a20 100644
--- a/test/files/neg/bug752.check
+++ b/test/files/neg/bug752.check
@@ -1,5 +1,5 @@
bug752.scala:6: error: type mismatch;
- found : (scala.Predef.String) => scala.Unit
+ found : (String) => scala.Unit
required: (scala.Int) => scala.Unit
f(&g)
^
diff --git a/test/files/neg/bug856.check b/test/files/neg/bug856.check
index e78077f437..80c4deeea2 100644
--- a/test/files/neg/bug856.check
+++ b/test/files/neg/bug856.check
@@ -1,4 +1,4 @@
-bug856.scala:3: error: class ComplexRect needs to be abstract, since method _2 in trait Product2 of type => scala.Predef.double is not defined
+bug856.scala:3: error: class ComplexRect needs to be abstract, since method _2 in trait Product2 of type => double is not defined
class ComplexRect(val _1:double, _2:double) extends Complex {
^
one error found
diff --git a/test/files/neg/bug900.check b/test/files/neg/bug900.check
index 0bb5edad80..3345255231 100644
--- a/test/files/neg/bug900.check
+++ b/test/files/neg/bug900.check
@@ -3,7 +3,7 @@ bug900.scala:4: error: type mismatch;
required: scala.AnyRef
Note that implicit conversions are not applicable because they are ambiguous:
both method any2stringadd in object Predef of type (scala.Any)scala.runtime.StringAdd
- and method any2ArrowAssoc in object Predef of type [a](a)scala.Predef.ArrowAssoc[a]
+ and method any2ArrowAssoc in object Predef of type [a](a)ArrowAssoc[a]
are possible conversion functions from Foo.this.x.type to scala.AnyRef
def break(): x.type
^
diff --git a/test/files/neg/bug910.check b/test/files/neg/bug910.check
index 855793d412..bf761eb04d 100644
--- a/test/files/neg/bug910.check
+++ b/test/files/neg/bug910.check
@@ -1,6 +1,6 @@
bug910.scala:4: error: type mismatch;
found : scala.Seq[scala.Char]
- required: scala.Seq[scala.Predef.int]
+ required: scala.Seq[int]
val y: Seq[int] = rest
^
one error found
diff --git a/test/files/neg/implicits.check b/test/files/neg/implicits.check
index 1af86e6c05..079764df42 100644
--- a/test/files/neg/implicits.check
+++ b/test/files/neg/implicits.check
@@ -2,7 +2,7 @@ implicits.scala:21: error: type mismatch;
found : Pos
required: ?{val +: ?}
Note that implicit conversions are not applicable because they are ambiguous:
- most specific definition is: method pos2int in object Super of type (Pos)scala.Predef.int
+ most specific definition is: method pos2int in object Super of type (Pos)int
yet alternative definition method any2plus in object Sub of type (scala.Any)Sub.Plus
is defined in a subclass.
Both definitions are possible conversion functions from Pos to ?{val +: ?}
diff --git a/test/files/neg/overload.check b/test/files/neg/overload.check
index 70d292b349..62f61c2de9 100644
--- a/test/files/neg/overload.check
+++ b/test/files/neg/overload.check
@@ -1,5 +1,5 @@
overload.scala:10: error: erroneous reference to overloaded definition,
-most specific definition is: method f in class C of type (scala.Predef.int)scala.Unit,
+most specific definition is: method f in class C of type (int)scala.Unit,
yet alternative definition method f in class D of type (scala.Any)scala.Unit
is defined in a subclass
(new D).f(1)
diff --git a/test/files/neg/tcpoly_typealias.check b/test/files/neg/tcpoly_typealias.check
index 56912c49b7..8a2ae91f89 100644
--- a/test/files/neg/tcpoly_typealias.check
+++ b/test/files/neg/tcpoly_typealias.check
@@ -7,7 +7,7 @@ BCon.this.m's type parameters do not match type m's expected parameters: type x
type m[-x] = FooCon[x] // error: contravariant x
^
tcpoly_typealias.scala:45: error: The kind of type m does not conform to the expected kind of type m<: [+x]>: scala.Nothing <: scala.Any in trait A.
-BBound.this.m's type parameters do not match type m's expected parameters: type x (in trait BBound)'s bounds >: scala.Nothing <: scala.Predef.String are stricter than type x (in trait A)'s declared bounds >: scala.Nothing <: scala.Any
+BBound.this.m's type parameters do not match type m's expected parameters: type x (in trait BBound)'s bounds >: scala.Nothing <: String are stricter than type x (in trait A)'s declared bounds >: scala.Nothing <: scala.Any
type m[+x <: String] = FooBound[x] // error: x with stricter bound
^
three errors found
diff --git a/test/files/neg/tcpoly_variance.check b/test/files/neg/tcpoly_variance.check
index 5fd104d607..61d7094437 100644
--- a/test/files/neg/tcpoly_variance.check
+++ b/test/files/neg/tcpoly_variance.check
@@ -1,5 +1,5 @@
tcpoly_variance.scala:6: error: error overriding method str in class A of type => m[java.lang.Object];
- method str has incompatible type => m[scala.Predef.String]
+ method str has incompatible type => m[String]
override def str: m[String] = error("foo") // since x in m[x] is invariant, ! m[String] <: m[Object]
^
one error found
diff --git a/test/files/neg/tcpoly_variance_enforce.check b/test/files/neg/tcpoly_variance_enforce.check
index c66440434b..93b1c1fd51 100644
--- a/test/files/neg/tcpoly_variance_enforce.check
+++ b/test/files/neg/tcpoly_variance_enforce.check
@@ -7,7 +7,7 @@ FooContra's type parameters do not match type m's expected parameters: type x (i
object fcollcon extends coll[FooContra] // error
^
tcpoly_variance_enforce.scala:17: error: the kinds of the type arguments (FooString) do not conform to the expected kinds of the type parameters (type m) in trait coll.
-FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: scala.Nothing <: scala.Predef.String are stricter than type x's declared bounds >: scala.Nothing <: scala.Any
+FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: scala.Nothing <: String are stricter than type x's declared bounds >: scala.Nothing <: scala.Any
object fcollwb extends coll[FooString] // error
^
tcpoly_variance_enforce.scala:19: error: the kinds of the type arguments (FooCov) do not conform to the expected kinds of the type parameters (type m) in trait coll2.
@@ -19,19 +19,19 @@ FooInvar's type parameters do not match type m's expected parameters: type x (in
object fcoll2inv extends coll2[FooInvar] // error
^
tcpoly_variance_enforce.scala:22: error: the kinds of the type arguments (FooString) do not conform to the expected kinds of the type parameters (type m) in trait coll2.
-FooString's type parameters do not match type m's expected parameters: type x (in class FooString) is covariant, but type x is declared contravarianttype x (in class FooString)'s bounds >: scala.Nothing <: scala.Predef.String are stricter than type x's declared bounds >: scala.Nothing <: scala.Any
+FooString's type parameters do not match type m's expected parameters: type x (in class FooString) is covariant, but type x is declared contravarianttype x (in class FooString)'s bounds >: scala.Nothing <: String are stricter than type x's declared bounds >: scala.Nothing <: scala.Any
object fcoll2wb extends coll2[FooString] // error
^
tcpoly_variance_enforce.scala:27: error: the kinds of the type arguments (FooString) do not conform to the expected kinds of the type parameters (type m) in trait coll3.
-FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: scala.Nothing <: scala.Predef.String are stricter than type x's declared bounds >: scala.Nothing <: scala.Any
+FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: scala.Nothing <: String are stricter than type x's declared bounds >: scala.Nothing <: scala.Any
object fcoll3wb extends coll3[FooString] // error
^
tcpoly_variance_enforce.scala:30: error: the kinds of the type arguments (FooString,scala.Int) do not conform to the expected kinds of the type parameters (type m,type y) in trait coll4.
-FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: scala.Nothing <: scala.Predef.String are stricter than type x's declared bounds >: scala.Nothing <: y
+FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: scala.Nothing <: String are stricter than type x's declared bounds >: scala.Nothing <: y
object fcoll4_1 extends coll4[FooString, Int] // error
^
tcpoly_variance_enforce.scala:31: error: the kinds of the type arguments (FooString,scala.Any) do not conform to the expected kinds of the type parameters (type m,type y) in trait coll4.
-FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: scala.Nothing <: scala.Predef.String are stricter than type x's declared bounds >: scala.Nothing <: y
+FooString's type parameters do not match type m's expected parameters: type x (in class FooString)'s bounds >: scala.Nothing <: String are stricter than type x's declared bounds >: scala.Nothing <: y
object fcoll4_2 extends coll4[FooString, Any] // error
^
tcpoly_variance_enforce.scala:37: error: the kinds of the type arguments (FooInvar) do not conform to the expected kinds of the type parameters (type m) in trait coll.