From 9835d33da7c98feb2f1917b0694d1628d675262a Mon Sep 17 00:00:00 2001 From: Cody Allen Date: Thu, 3 Oct 2013 08:30:15 -0400 Subject: 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. --- src/library/scala/annotation/implicitNotFound.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3