summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorCody Allen <ceedubs@gmail.com>2013-10-03 08:30:15 -0400
committerCody Allen <ceedubs@gmail.com>2013-10-03 14:10:05 -0400
commit9835d33da7c98feb2f1917b0694d1628d675262a (patch)
treeb90457108ad2ef604437ad27fd9bf94f99db3e16 /src/library
parent33be64d195fd2c92707033af3538a92c4948d8c1 (diff)
downloadscala-9835d33da7c98feb2f1917b0694d1628d675262a.tar.gz
scala-9835d33da7c98feb2f1917b0694d1628d675262a.tar.bz2
scala-9835d33da7c98feb2f1917b0694d1628d675262a.zip
Describe type parameter interpolation in @implicitNotFound documentation
Using this feature is necessary for helpful error messages, so it should be documented. Thank you to @adriaanm for recommending the this description.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/annotation/implicitNotFound.scala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/library/scala/annotation/implicitNotFound.scala b/src/library/scala/annotation/implicitNotFound.scala
index bbde90cebb..eeedcb014e 100644
--- a/src/library/scala/annotation/implicitNotFound.scala
+++ b/src/library/scala/annotation/implicitNotFound.scala
@@ -9,8 +9,11 @@
package scala.annotation
/**
- * An annotation that specifies the error message that is emitted when the compiler
- * cannot find an implicit value of the annotated type.
+ * To customize the error message that's emitted when an implicit of type
+ * C[T1,..., TN] cannot be found, annotate the class C with @implicitNotFound.
+ * Assuming C has type parameters X1,..., XN, the error message will be the
+ * result of replacing all occurrences of ${Xi} in the string msg with the
+ * string representation of the corresponding type argument Ti. *
*
* @author Adriaan Moors
* @since 2.8.1