summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-10 07:21:41 +0000
committerPaul Phillips <paulp@improving.org>2011-01-10 07:21:41 +0000
commit58b5c24df8ba06c02b92723922bc21381fedeb93 (patch)
tree8fa5125a14749eddc2e70b8e352f927029049a45
parentd06ccf64f0bc8a0b86da21cd8118d4de02f93c6b (diff)
downloadscala-58b5c24df8ba06c02b92723922bc21381fedeb93.tar.gz
scala-58b5c24df8ba06c02b92723922bc21381fedeb93.tar.bz2
scala-58b5c24df8ba06c02b92723922bc21381fedeb93.zip
Oops, the implicit not found message was wrong:
scala> implicitly[CanBuildFrom[String, Int, List[List[Int]]]] <console>:10: error: Cannot construct a collection of type List[List[Int]] with elements of type Int based on a collection of type List[List[Int]]. implicitly[CanBuildFrom[String, Int, List[List[Int]]]] ^ No review.
-rw-r--r--src/library/scala/collection/generic/CanBuildFrom.scala2
-rw-r--r--test/files/neg/t2462a.check2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/collection/generic/CanBuildFrom.scala b/src/library/scala/collection/generic/CanBuildFrom.scala
index 4c923dca44..630a0df96c 100644
--- a/src/library/scala/collection/generic/CanBuildFrom.scala
+++ b/src/library/scala/collection/generic/CanBuildFrom.scala
@@ -25,7 +25,7 @@ import scala.annotation.implicitNotFound
* @author Adriaan Moors
* @since 2.8
*/
-@implicitNotFound(msg = "Cannot construct a collection of type ${To} with elements of type ${Elem} based on a collection of type ${To}.")
+@implicitNotFound(msg = "Cannot construct a collection of type ${To} with elements of type ${Elem} based on a collection of type ${From}.")
trait CanBuildFrom[-From, -Elem, +To] {
/** Creates a new builder on request of a collection.
diff --git a/test/files/neg/t2462a.check b/test/files/neg/t2462a.check
index 040a01f3a1..86d74b86d4 100644
--- a/test/files/neg/t2462a.check
+++ b/test/files/neg/t2462a.check
@@ -1,4 +1,4 @@
-t2462a.scala:2: error: Cannot construct a collection of type List[String] with elements of type Int based on a collection of type List[String].
+t2462a.scala:2: error: Cannot construct a collection of type List[String] with elements of type Int based on a collection of type List[Int].
List(1,2,3).map[Int, List[String]](x => 1)
^
one error found