Skip to content

Commit 8084294

Browse files
authored
Merge pull request scala/scala#10134 from SethTisue/valueof-implicitnotfound
2 parents e27a4e7 + 186d1d1 commit 8084294

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

library/src/scala/ValueOf.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ package scala
1717
* single inhabitant. Eligible types are singleton types of the form `stablePath.type`,
1818
* Unit and singleton types corresponding to value literals.
1919
*
20-
* Instances of `ValueOf[T]` are provided implicitly for all eligible types. Typically
20+
* The value itself can conveniently be retrieved with [[Predef#valueOf]], which requires
21+
* a `ValueOf` to be available in implicit scope.
22+
*
23+
* The compiler provides instances of `ValueOf[T]` for all eligible types. Typically
2124
* an instance would be required where a runtime value corresponding to a type level
2225
* computation is needed.
2326
@@ -48,5 +51,5 @@ package scala
4851
* is required in the implementation of `+` it is provided at the call site via the
4952
* implicit argument `m` of type `ValueOf[M]`.
5053
*/
51-
@scala.annotation.implicitNotFound(msg = "No singleton value available for ${T}.")
54+
@scala.annotation.implicitNotFound(msg = "No singleton value available for ${T}; eligible singleton types for `ValueOf` synthesis include literals and stable paths.")
5255
final class ValueOf[T](val value: T) extends AnyVal

0 commit comments

Comments
 (0)