diff options
author | Cody Allen <ceedubs@gmail.com> | 2013-10-03 08:30:15 -0400 |
---|---|---|
committer | Cody Allen <ceedubs@gmail.com> | 2013-10-03 14:10:05 -0400 |
commit | 9835d33da7c98feb2f1917b0694d1628d675262a (patch) | |
tree | b90457108ad2ef604437ad27fd9bf94f99db3e16 | |
parent | 33be64d195fd2c92707033af3538a92c4948d8c1 (diff) | |
download | scala-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.
-rw-r--r-- | src/library/scala/annotation/implicitNotFound.scala | 7 |
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 |