summaryrefslogtreecommitdiff
path: root/test/files/buildmanager
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-12-19 23:20:13 +0000
committerPaul Phillips <paulp@improving.org>2010-12-19 23:20:13 +0000
commit0e306e1f90f51efa2d423fd7df810f7cc8dfa915 (patch)
treef07513cfcbc4910391e3c48351f35dbfe43fb22e /test/files/buildmanager
parent580b030d4110d810310e0fb2dfeff34230803d73 (diff)
downloadscala-0e306e1f90f51efa2d423fd7df810f7cc8dfa915.tar.gz
scala-0e306e1f90f51efa2d423fd7df810f7cc8dfa915.tar.bz2
scala-0e306e1f90f51efa2d423fd7df810f7cc8dfa915.zip
Explaining something for the (largeish N)th tim...
Explaining something for the (largeish N)th time finally awoke me to the fact that software can explain things. I labored a long time over this error message: I'm sure it can still use work (and/or it will drive scalaz users off some kind of cliff) but the simple common case people have so much trouble with is lit up like a christmas tree and for this I will take some bullets. build/pack/bin/scala -e 'class Foo[T] ; Set[Foo[AnyRef]]() + new Foo[String]' :1: error: type mismatch; found : this.Foo[String] required: this.Foo[java.lang.Object] Note: String <: java.lang.Object, but class Foo is invariant in type T. You may wish to define T as +T instead. (SLS 4.5) class Foo[T] ; Set[Foo[AnyRef]]() + new Foo[String] ^ Review by moors.
Diffstat (limited to 'test/files/buildmanager')
-rw-r--r--test/files/buildmanager/t2653/t2653.check2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/files/buildmanager/t2653/t2653.check b/test/files/buildmanager/t2653/t2653.check
index 0d40601962..6a4fc0e982 100644
--- a/test/files/buildmanager/t2653/t2653.check
+++ b/test/files/buildmanager/t2653/t2653.check
@@ -9,5 +9,7 @@ compiling Set(B.scala)
B.scala:2: error: type mismatch;
found : A[Int]
required: A[Any]
+Note: Int <: Any, but class A is invariant in type T.
+You may wish to define T as +T instead. (SLS 4.5)
val a: A[Any] = new A[Int]
^