Skip to content

Commit 03fbdc5

Browse files
committed
Fix compiletime.erasedValue docs
1 parent bd05d37 commit 03fbdc5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

library/src/scala/compiletime/package.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ package object compiletime {
88
* pattern match on it. For example, given a type `Tup <: Tuple`, one can
99
* pattern-match on it as follows:
1010
* ```
11-
* erasedValue[Tup] match {
11+
* inline erasedValue[Tup] match {
1212
* case _: EmptyTuple => ...
1313
* case _: h *: t => ...
1414
* }
1515
* ```
16+
* This value can only be used in an inline match and the value cannot be used in
17+
* the branches.
1618
*/
1719
erased def erasedValue[T]: T = ???
1820

0 commit comments

Comments
 (0)