summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2007-04-19 17:17:01 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2007-04-19 17:17:01 +0000
commited8f3f0b9b31e75b14933e889d6aa105d2c0f0b7 (patch)
treea1d594d6080e28562d453d953e97db37292e6916
parent7b2bdb4e75f72fbdf4c488aea112d7838f89bc5f (diff)
downloadscala-ed8f3f0b9b31e75b14933e889d6aa105d2c0f0b7.tar.gz
scala-ed8f3f0b9b31e75b14933e889d6aa105d2c0f0b7.tar.bz2
scala-ed8f3f0b9b31e75b14933e889d6aa105d2c0f0b7.zip
suppress "scala." prefix in string representati...
suppress "scala." prefix in string representation of types (in error messages,..)
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Symbols.scala5
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Types.scala6
-rw-r--r--test/files/neg/bug1024.check2
-rw-r--r--test/files/neg/bug1041.check4
-rw-r--r--test/files/neg/bug412.check2
-rw-r--r--test/files/neg/bug414.check2
-rw-r--r--test/files/neg/bug550.check2
-rw-r--r--test/files/neg/bug562.check2
-rw-r--r--test/files/neg/bug588.check8
-rw-r--r--test/files/neg/bug663.check4
-rw-r--r--test/files/neg/bug664.check4
-rw-r--r--test/files/neg/bug677.check4
-rw-r--r--test/files/neg/bug696.check2
-rw-r--r--test/files/neg/bug708.check4
-rw-r--r--test/files/neg/bug752.check4
-rw-r--r--test/files/neg/bug839.check2
-rw-r--r--test/files/neg/bug846.check2
-rw-r--r--test/files/neg/bug900.check6
-rw-r--r--test/files/neg/bug909.check2
-rw-r--r--test/files/neg/bug910.check4
-rw-r--r--test/files/neg/checksensible.check22
-rw-r--r--test/files/neg/constrs.check2
-rw-r--r--test/files/neg/implicits.check2
-rw-r--r--test/files/neg/lubs.check8
-rw-r--r--test/files/neg/overload.check4
-rw-r--r--test/files/neg/tcpoly_bounds.check2
-rw-r--r--test/files/neg/tcpoly_typealias.check8
-rw-r--r--test/files/neg/tcpoly_variance_enforce.check14
-rw-r--r--test/files/neg/viewtest.check4
29 files changed, 70 insertions, 67 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
index a00efde133..e3429ceeba 100644
--- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
@@ -212,7 +212,10 @@ trait Symbols {
final def isRootPackage = isPackage && name == nme.ROOTPKG
final def isEmptyPackage = isPackage && name == nme.EMPTY_PACKAGE_NAME
final def isEmptyPackageClass = isPackageClass && name == nme.EMPTY_PACKAGE_NAME.toTypeName
- final def isPredefModule = isModule && name == nme.Predef
+ final def isPredefModule = isModule && name == nme.Predef // not printed as a prefix
+ final def isScalaPackage = isPackage && name == nme.scala_ // not printed as a prefix
+ final def isScalaPackageClass = isPackageClass && name == nme.scala_.toTypeName // not printed as a prefix
+
def isDeprecated =
attributes exists (attr => attr.atp.symbol == DeprecatedAttr)
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala
index 3ad981a38d..78b9f488f9 100644
--- a/src/compiler/scala/tools/nsc/symtab/Types.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Types.scala
@@ -623,7 +623,7 @@ trait Types {
override def singleDeref: Type = sym.typeOfThis
override def prefixString =
if (settings.debug.value) sym.nameString + ".this."
- else if (sym.isRoot || sym.isEmptyPackageClass || sym.isInterpreterWrapper) ""
+ else if (sym.isRoot || sym.isEmptyPackageClass || sym.isInterpreterWrapper || sym.isScalaPackageClass) ""
else if (sym.isAnonymousClass || sym.isRefinementClass) "this."
else if (sym.isPackageClass) sym.fullNameString + "."
else sym.nameString + ".this."
@@ -671,7 +671,7 @@ trait Types {
override def symbol = sym
override def prefix: Type = pre
override def prefixString: String =
- if ((sym.isEmptyPackage || sym.isInterpreterWrapper || sym.isPredefModule) && !settings.debug.value) ""
+ if ((sym.isEmptyPackage || sym.isInterpreterWrapper || sym.isPredefModule || sym.isScalaPackage) && !settings.debug.value) ""
else pre.prefixString + sym.nameString + "."
}
@@ -1213,7 +1213,7 @@ A type's symbol should never be inspected directly.
override def prefixString =
if (settings.debug.value) super.prefixString
else if (sym.isRoot || sym.isEmptyPackageClass || sym.isInterpreterWrapper ||
- sym.isAnonymousClass || sym.isRefinementClass) ""
+ sym.isAnonymousClass || sym.isRefinementClass || sym.isScalaPackageClass) ""
else if (sym.isPackageClass) sym.fullNameString + "."
else super.prefixString
}
diff --git a/test/files/neg/bug1024.check b/test/files/neg/bug1024.check
index 74ff983647..c70ff47ec0 100644
--- a/test/files/neg/bug1024.check
+++ b/test/files/neg/bug1024.check
@@ -1,4 +1,4 @@
-bug1024.scala:2: error: type _ escapes its defining scope as part of type (scala.List[_], scala.Int)
+bug1024.scala:2: error: type _ escapes its defining scope as part of type (List[_], Int)
val (a: List[_], b) = (List(1 ,2 ,3 ), 4)
^
one error found
diff --git a/test/files/neg/bug1041.check b/test/files/neg/bug1041.check
index 0b9d6223b7..c366364241 100644
--- a/test/files/neg/bug1041.check
+++ b/test/files/neg/bug1041.check
@@ -1,6 +1,6 @@
bug1041.scala:3: error: type mismatch;
- found : scala.Int(1)
- required: scala.List[scala.Int]
+ found : Int(1)
+ required: List[Int]
case 1 => 4
^
one error found
diff --git a/test/files/neg/bug412.check b/test/files/neg/bug412.check
index a6b2f0fba3..e275c5d271 100644
--- a/test/files/neg/bug412.check
+++ b/test/files/neg/bug412.check
@@ -1,5 +1,5 @@
bug412.scala:9: error: type mismatch;
- found : scala.Null(null)
+ found : Null(null)
required: A.this.CX with A.this.C2
val c: CX with C2 = null;
^
diff --git a/test/files/neg/bug414.check b/test/files/neg/bug414.check
index 9f6717ca9e..67b467ce5d 100644
--- a/test/files/neg/bug414.check
+++ b/test/files/neg/bug414.check
@@ -2,7 +2,7 @@ bug414.scala:5: error: stable identifier required, but Empty found.
case Empty =>
^
bug414.scala:7: error: type mismatch;
- found : scala.Unit
+ found : Unit
required: a
case _ =>
^
diff --git a/test/files/neg/bug550.check b/test/files/neg/bug550.check
index 6dcd8f51c6..6c8580091c 100644
--- a/test/files/neg/bug550.check
+++ b/test/files/neg/bug550.check
@@ -1,7 +1,7 @@
bug550.scala:6: error: class List takes type parameters
def sum[a](xs: List)(implicit m: Monoid[a]): a =
^
-bug550.scala:8: error: no implicit argument matching parameter type Monoid[scala.Nothing] was found.
+bug550.scala:8: error: no implicit argument matching parameter type Monoid[Nothing] was found.
sum(List(1,2,3))
^
two errors found
diff --git a/test/files/neg/bug562.check b/test/files/neg/bug562.check
index f709b20af2..2cec407d45 100644
--- a/test/files/neg/bug562.check
+++ b/test/files/neg/bug562.check
@@ -1,4 +1,4 @@
-bug562.scala:10: error: error overriding value y in trait YYY of type scala.Int;
+bug562.scala:10: error: error overriding value y in trait YYY of type Int;
value y cannot override a value or variable definition in a trait
(this is an implementation restriction)
override val y = super.y;
diff --git a/test/files/neg/bug588.check b/test/files/neg/bug588.check
index f652292a2c..b1e5340c91 100644
--- a/test/files/neg/bug588.check
+++ b/test/files/neg/bug588.check
@@ -1,13 +1,13 @@
bug588.scala:3: error: double definition:
method visit:((int) => String)boolean and
method visit:((int) => unit)boolean at line 2
-have same type after erasure: (scala.Function1)scala.Boolean
+have same type after erasure: (Function1)Boolean
def visit(f: int => String): boolean
^
bug588.scala:10: error: double definition:
-method f:(Test.this.TypeB)scala.Unit and
-method f:(Test.this.TypeA)scala.Unit at line 9
-have same type after erasure: (Test#TraitA)scala.Unit
+method f:(Test.this.TypeB)Unit and
+method f:(Test.this.TypeA)Unit at line 9
+have same type after erasure: (Test#TraitA)Unit
def f(brac : TypeB) : Unit;
^
two errors found
diff --git a/test/files/neg/bug663.check b/test/files/neg/bug663.check
index 3f80d11506..55b0b8f7bb 100644
--- a/test/files/neg/bug663.check
+++ b/test/files/neg/bug663.check
@@ -1,6 +1,6 @@
bug663.scala:11: error: name clash between defined and inherited member:
-method asMatch:(Test.this.Node)scala.Any and
-method asMatch:(Test.this.Matchable)scala.Any in trait MatchableImpl
+method asMatch:(Test.this.Node)Any and
+method asMatch:(Test.this.Matchable)Any in trait MatchableImpl
have same type after erasure: (test.Test#NodeImpl)java.lang.Object
def asMatch(m : Node) : Any = {
^
diff --git a/test/files/neg/bug664.check b/test/files/neg/bug664.check
index 31492d83ba..176058d962 100644
--- a/test/files/neg/bug664.check
+++ b/test/files/neg/bug664.check
@@ -1,7 +1,7 @@
-bug664.scala:4: error: type Foo is not a member of test.Test with scala.ScalaObject
+bug664.scala:4: error: type Foo is not a member of test.Test with ScalaObject
trait Foo extends super.Foo {
^
-bug664.scala:5: error: type Bar is not a member of scala.AnyRef with scala.ScalaObject
+bug664.scala:5: error: type Bar is not a member of AnyRef with ScalaObject
trait Bar extends super.Bar;
^
two errors found
diff --git a/test/files/neg/bug677.check b/test/files/neg/bug677.check
index a50f3b55b8..5b0bb2705f 100644
--- a/test/files/neg/bug677.check
+++ b/test/files/neg/bug677.check
@@ -1,6 +1,6 @@
bug677.scala:2: error: type mismatch;
- found : () => scala.Int
- required: scala.Nothing
+ found : () => Int
+ required: Nothing
val zx: Nothing = {() => 4}
^
one error found
diff --git a/test/files/neg/bug696.check b/test/files/neg/bug696.check
index 1b11d5074f..a2f31702b7 100644
--- a/test/files/neg/bug696.check
+++ b/test/files/neg/bug696.check
@@ -3,7 +3,7 @@ bug696.scala:3: error: implicit method WithType is not contractive,
is not strictly contained in the signature TypeUtil0.this.Type[S with T]
implicit def WithType[S,T](implicit tpeS : Type[S], tpeT : Type[T]) : Type[S with T] = null
^
-bug696.scala:4: error: no implicit argument matching parameter type TypeUtil0.this.Type[scala.Any] was found.
+bug696.scala:4: error: no implicit argument matching parameter type TypeUtil0.this.Type[Any] was found.
as[Any](null);
^
two errors found
diff --git a/test/files/neg/bug708.check b/test/files/neg/bug708.check
index 1c4d96e674..513709f2a0 100644
--- a/test/files/neg/bug708.check
+++ b/test/files/neg/bug708.check
@@ -1,5 +1,5 @@
-bug708.scala:8: error: error overriding type S in trait X with bounds >: scala.Nothing <: A.this.T;
- type S has incompatible type scala.Any
+bug708.scala:8: error: error overriding type S in trait X with bounds >: Nothing <: A.this.T;
+ type S has incompatible type Any
override private[A] type S = Any;
^
one error found
diff --git a/test/files/neg/bug752.check b/test/files/neg/bug752.check
index 5eddaf2a20..7559a497ce 100644
--- a/test/files/neg/bug752.check
+++ b/test/files/neg/bug752.check
@@ -1,6 +1,6 @@
bug752.scala:6: error: type mismatch;
- found : (String) => scala.Unit
- required: (scala.Int) => scala.Unit
+ found : (String) => Unit
+ required: (Int) => Unit
f(&g)
^
one error found
diff --git a/test/files/neg/bug839.check b/test/files/neg/bug839.check
index ec5206effa..fa161de5a5 100644
--- a/test/files/neg/bug839.check
+++ b/test/files/neg/bug839.check
@@ -1,5 +1,5 @@
bug839.scala:25: error: method set cannot be accessed in object Test.this.FileImpl#treeBuilder
- because its instance type (Test.this.Global#Tree)scala.Unit contains a malformed type: Test.this.Global#Tree
+ because its instance type (Test.this.Global#Tree)Unit contains a malformed type: Test.this.Global#Tree
file.treeBuilder.set(nsc.get);
^
one error found
diff --git a/test/files/neg/bug846.check b/test/files/neg/bug846.check
index 8d1414ae9a..9a17238c64 100644
--- a/test/files/neg/bug846.check
+++ b/test/files/neg/bug846.check
@@ -1,5 +1,5 @@
bug846.scala:9: error: type mismatch;
- found : scala.Null(null)
+ found : Null(null)
required: B
if (a != null) f(a) else null
^
diff --git a/test/files/neg/bug900.check b/test/files/neg/bug900.check
index 3345255231..f5687ac645 100644
--- a/test/files/neg/bug900.check
+++ b/test/files/neg/bug900.check
@@ -1,10 +1,10 @@
bug900.scala:4: error: type mismatch;
found : Foo.this.x.type (with underlying type Foo.this.bar)
- required: scala.AnyRef
+ required: 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
+ both method any2stringadd in object Predef of type (Any)scala.runtime.StringAdd
and method any2ArrowAssoc in object Predef of type [a](a)ArrowAssoc[a]
- are possible conversion functions from Foo.this.x.type to scala.AnyRef
+ are possible conversion functions from Foo.this.x.type to AnyRef
def break(): x.type
^
one error found
diff --git a/test/files/neg/bug909.check b/test/files/neg/bug909.check
index 09fe4e05be..6dbe8aa024 100644
--- a/test/files/neg/bug909.check
+++ b/test/files/neg/bug909.check
@@ -1,6 +1,6 @@
bug909.scala:6: error: type mismatch;
found : java.lang.String("Hello")
- required: scala.Int
+ required: Int
case Foo("Hello") =>
^
one error found
diff --git a/test/files/neg/bug910.check b/test/files/neg/bug910.check
index bf761eb04d..ffb07faf2a 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[int]
+ found : Seq[Char]
+ required: Seq[int]
val y: Seq[int] = rest
^
one error found
diff --git a/test/files/neg/checksensible.check b/test/files/neg/checksensible.check
index 112d101076..7c0c71c803 100644
--- a/test/files/neg/checksensible.check
+++ b/test/files/neg/checksensible.check
@@ -1,19 +1,19 @@
checksensible.scala:1: error: class Test needs to be abstract, since method isabstract is not defined
class Test {
^
-checksensible.scala:3: warning: comparing values of types scala.Ordered[scala.Unit] and scala.Unit using `>' will always yield false
+checksensible.scala:3: warning: comparing values of types Ordered[Unit] and Unit using `>' will always yield false
println((c = 1) > 0)
^
-checksensible.scala:4: warning: comparing values of types scala.Ordered[scala.Unit] and scala.Unit using `<=' will always yield true
+checksensible.scala:4: warning: comparing values of types Ordered[Unit] and Unit using `<=' will always yield true
println((c = 1) <= 0)
^
-checksensible.scala:5: warning: comparing values of types scala.Unit and scala.Int using `==' will always yield false
+checksensible.scala:5: warning: comparing values of types Unit and Int using `==' will always yield false
println((c = 1) == 0)
^
-checksensible.scala:7: warning: comparing values of types scala.Int and java.lang.String using `==' will always yield false
+checksensible.scala:7: warning: comparing values of types Int and java.lang.String using `==' will always yield false
println(1 == "abc")
^
-checksensible.scala:8: warning: comparing values of types scala.Int and scala.Boolean using `!=' will always yield true
+checksensible.scala:8: warning: comparing values of types Int and Boolean using `!=' will always yield true
println(1 != true)
^
checksensible.scala:10: warning: comparing a fresh object using `==' will always yield false
@@ -25,25 +25,25 @@ checksensible.scala:11: warning: comparing a fresh object using `==' will always
checksensible.scala:12: warning: comparing a fresh object using `!=' will always yield true
println(new Array(1) != new Array(1))
^
-checksensible.scala:15: warning: comparing values of types scala.Int and scala.Null using `==' will always yield false
+checksensible.scala:15: warning: comparing values of types Int and Null using `==' will always yield false
if (foo.length == null) // == 0 makes more sense, but still
^
-checksensible.scala:24: warning: comparing values of types scala.Unit and scala.Int using `!=' will always yield true
+checksensible.scala:24: warning: comparing values of types Unit and Int using `!=' will always yield true
while ((c = in.read) != -1)
^
-checksensible.scala:30: warning: comparing values of types scala.Unit and scala.Boolean using `==' will always yield false
+checksensible.scala:30: warning: comparing values of types Unit and Boolean using `==' will always yield false
println({} == true)
^
checksensible.scala:32: warning: comparing a fresh object using `==' will always yield false
println(new Object == 1)
^
-checksensible.scala:33: warning: comparing values of types scala.Int and java.lang.Object using `==' will always yield false
+checksensible.scala:33: warning: comparing values of types Int and java.lang.Object using `==' will always yield false
println(1 == (new Object))
^
-checksensible.scala:37: warning: comparing values of types scala.Int and scala.Unit using `!=' will always yield true
+checksensible.scala:37: warning: comparing values of types Int and Unit using `!=' will always yield true
println(1 != println)
^
-checksensible.scala:38: warning: comparing values of types scala.Int and scala.Symbol using `!=' will always yield true
+checksensible.scala:38: warning: comparing values of types Int and Symbol using `!=' will always yield true
println(1 != 'sym)
^
15 warnings found
diff --git a/test/files/neg/constrs.check b/test/files/neg/constrs.check
index 9c0962f6bb..3680f292b2 100644
--- a/test/files/neg/constrs.check
+++ b/test/files/neg/constrs.check
@@ -11,7 +11,7 @@ constrs.scala:12: error: called constructor's definition must precede calling co
def this(x: boolean) = this(x)
^
constrs.scala:16: error: type mismatch;
- found : scala.Int(1)
+ found : Int(1)
required: a
def this() = this(1)
^
diff --git a/test/files/neg/implicits.check b/test/files/neg/implicits.check
index 079764df42..409d6ce6a7 100644
--- a/test/files/neg/implicits.check
+++ b/test/files/neg/implicits.check
@@ -3,7 +3,7 @@ implicits.scala:21: error: type mismatch;
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)int
- yet alternative definition method any2plus in object Sub of type (scala.Any)Sub.Plus
+ yet alternative definition method any2plus in object Sub of type (Any)Sub.Plus
is defined in a subclass.
Both definitions are possible conversion functions from Pos to ?{val +: ?}
f(p+1)
diff --git a/test/files/neg/lubs.check b/test/files/neg/lubs.check
index 2acf7ec301..81c280e76f 100644
--- a/test/files/neg/lubs.check
+++ b/test/files/neg/lubs.check
@@ -1,16 +1,16 @@
lubs.scala:11: error: type mismatch;
- found : test1.this.A[test1.this.A[test1.this.A[scala.Any]]]
- required: test1.this.A[test1.this.A[test1.this.A[test1.this.A[scala.Any]]]]
+ found : test1.this.A[test1.this.A[test1.this.A[Any]]]
+ required: test1.this.A[test1.this.A[test1.this.A[test1.this.A[Any]]]]
val x4: A[A[A[A[Any]]]] = f
^
lubs.scala:24: error: type mismatch;
found : test2.this.A{type T >: test2.this.C with test2.this.D <: test2.this.A}
- required: test2.this.A{type T >: scala.Null <: test2.this.A{type T >: scala.Null <: test2.this.A}}
+ required: test2.this.A{type T >: Null <: test2.this.A{type T >: Null <: test2.this.A}}
val x3: A { type T >: Null <: A { type T >: Null <: A } } = f
^
lubs.scala:25: error: type mismatch;
found : test2.this.A{type T >: test2.this.C with test2.this.D <: test2.this.A}
- required: test2.this.A{type T >: scala.Null <: test2.this.A{type T >: scala.Null <: test2.this.A{type T >: scala.Null <: test2.this.A}}}
+ required: test2.this.A{type T >: Null <: test2.this.A{type T >: Null <: test2.this.A{type T >: Null <: test2.this.A}}}
val x4: A { type T >: Null <: A { type T >: Null <: A { type T >: Null <: A } } } = f
^
three errors found
diff --git a/test/files/neg/overload.check b/test/files/neg/overload.check
index 62f61c2de9..f3d3454116 100644
--- a/test/files/neg/overload.check
+++ b/test/files/neg/overload.check
@@ -1,6 +1,6 @@
overload.scala:10: error: erroneous reference to overloaded definition,
-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
+most specific definition is: method f in class C of type (int)Unit,
+yet alternative definition method f in class D of type (Any)Unit
is defined in a subclass
(new D).f(1)
^
diff --git a/test/files/neg/tcpoly_bounds.check b/test/files/neg/tcpoly_bounds.check
index 03e22f9fbc..206d862825 100644
--- a/test/files/neg/tcpoly_bounds.check
+++ b/test/files/neg/tcpoly_bounds.check
@@ -1,4 +1,4 @@
-tcpoly_bounds.scala:3: error: type arguments [scala.List] do not conform to class A's type parameter bounds [m<: [x]>: scala.Nothing <: scala.Option[x]]
+tcpoly_bounds.scala:3: error: type arguments [List] do not conform to class A's type parameter bounds [m<: [x]>: Nothing <: Option[x]]
object b extends A[List]
^
one error found
diff --git a/test/files/neg/tcpoly_typealias.check b/test/files/neg/tcpoly_typealias.check
index 8a2ae91f89..d7cf719127 100644
--- a/test/files/neg/tcpoly_typealias.check
+++ b/test/files/neg/tcpoly_typealias.check
@@ -1,13 +1,13 @@
-tcpoly_typealias.scala:37: error: The kind of type m does not conform to the expected kind of type m<: [+x]>: scala.Nothing <: scala.Any in trait A.
+tcpoly_typealias.scala:37: error: The kind of type m does not conform to the expected kind of type m<: [+x]>: Nothing <: Any in trait A.
BInv.this.m's type parameters do not match type m's expected parameters: type x (in trait BInv) is invariant, but type x (in trait A) is declared covariant
type m[x] = FooCov[x] // error: invariant x in alias def
^
-tcpoly_typealias.scala:41: error: The kind of type m does not conform to the expected kind of type m<: [+x]>: scala.Nothing <: scala.Any in trait A.
+tcpoly_typealias.scala:41: error: The kind of type m does not conform to the expected kind of type m<: [+x]>: Nothing <: Any in trait A.
BCon.this.m's type parameters do not match type m's expected parameters: type x (in trait BCon) is contravariant, but type x (in trait A) is declared covariant
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 <: String are stricter than type x (in trait A)'s declared bounds >: scala.Nothing <: scala.Any
+tcpoly_typealias.scala:45: error: The kind of type m does not conform to the expected kind of type m<: [+x]>: Nothing <: 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 >: Nothing <: String are stricter than type x (in trait A)'s declared bounds >: Nothing <: Any
type m[+x <: String] = FooBound[x] // error: x with stricter bound
^
three errors found
diff --git a/test/files/neg/tcpoly_variance_enforce.check b/test/files/neg/tcpoly_variance_enforce.check
index 93b1c1fd51..c13a09221f 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 <: 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 >: Nothing <: String are stricter than type x's declared bounds >: Nothing <: 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 <: 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 >: Nothing <: String are stricter than type x's declared bounds >: Nothing <: 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 <: 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 >: Nothing <: String are stricter than type x's declared bounds >: Nothing <: 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 <: String are stricter than type x's declared bounds >: scala.Nothing <: y
+tcpoly_variance_enforce.scala:30: error: the kinds of the type arguments (FooString,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 >: Nothing <: String are stricter than type x's declared bounds >: 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 <: String are stricter than type x's declared bounds >: scala.Nothing <: y
+tcpoly_variance_enforce.scala:31: error: the kinds of the type arguments (FooString,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 >: Nothing <: String are stricter than type x's declared bounds >: 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.
diff --git a/test/files/neg/viewtest.check b/test/files/neg/viewtest.check
index 2b1b2c4cbc..05b5fe0b16 100644
--- a/test/files/neg/viewtest.check
+++ b/test/files/neg/viewtest.check
@@ -1,6 +1,6 @@
viewtest.scala:43: error: type mismatch;
- found : scala.List[a(in method compareTo)]
- required: scala.List[a(in method view3)]
+ found : List[a(in method compareTo)]
+ required: List[a(in method view3)]
case y1: List[a] => compareLists(x, y1)
^
viewtest.scala:104: error: ambiguous implicit values: