File tree 1 file changed +2
-2
lines changed
docs/docs/reference/metaprogramming
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -671,7 +671,7 @@ optimize {
671
671
672
672
``` scala
673
673
def 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 ) }
675
675
private def optimizeExpr (body : Expr [Int ])(using QuoteContext ): Expr [Int ] = body match {
676
676
// Match a call to sum without any arguments
677
677
case ' { sum() } => Expr (0 )
@@ -717,7 +717,7 @@ This might be used to then perform an implicit search as in:
717
717
718
718
719
719
``` 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 ) }
721
721
722
722
private def showMeExpr (sc : Expr [StringContext ], argsExpr : Expr [Seq [Any ]])(using qctx : QuoteContext ): Expr [String ] = {
723
723
argsExpr match {
You can’t perform that action at this time.
0 commit comments