Skip to content

Commit 7dbf29e

Browse files
committed
Add docs for DottyPredef.summon
1 parent a2abd6c commit 7dbf29e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

library/src/dotty/DottyPredef.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ object DottyPredef {
3737
case ev: ValueOf[T] => ev.value
3838
}
3939

40+
/** Summon an given value of type `T`. Usually, the argument is not passed explicitly.
41+
*
42+
* @tparam T the type of the value to be summoned
43+
* @return the given value typed as the given parameter
44+
*/
4045
inline def summon[T](using x: T): x.type = x
4146

4247
// Extension methods for working with explicit nulls

0 commit comments

Comments
 (0)