Skip to content

Commit 94e7abe

Browse files
Merge pull request #9791 from dotty-staging/fix-erasedValue-docs
Fix compiletime.erasedValue docs
2 parents a05fc4b + 03fbdc5 commit 94e7abe

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)