File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
docs/docs/reference/metaprogramming Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -671,7 +671,7 @@ optimize {
671671
672672``` scala
673673def sum (args : Int * ): Int = args.sum
674- inline def optimize (arg : Int ): Int = $ { optimizeExpr(' arg ) }
674+ inline def optimize (inline arg : Int ): Int = $ { optimizeExpr(' arg ) }
675675private def optimizeExpr (body : Expr [Int ])(using QuoteContext ): Expr [Int ] = body match {
676676 // Match a call to sum without any arguments
677677 case ' { sum() } => Expr (0 )
@@ -717,7 +717,7 @@ This might be used to then perform an implicit search as in:
717717
718718
719719``` scala
720- inline def (sc : StringContext ).showMe(inline args : Any * ): String = $ { showMeExpr(' sc , ' args ) }
720+ inline def (inline sc : StringContext ).showMe(inline args : Any * ): String = $ { showMeExpr(' sc , ' args ) }
721721
722722private def showMeExpr (sc : Expr [StringContext ], argsExpr : Expr [Seq [Any ]])(using qctx : QuoteContext ): Expr [String ] = {
723723 argsExpr match {
You can’t perform that action at this time.
0 commit comments