Skip to content

Commit 07d9dd2

Browse files
Merge pull request #11551 from ivanopagano/patch-1
Correct the Macros+inline example expansion
2 parents 63a467b + 43df12e commit 07d9dd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/reference/metaprogramming/macros.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ then it will splice `sum`:
560560
val arr: Array[Int] = Array.apply(1, [2,3 : Int]:Int*)
561561

562562
var sum = 0
563-
${ map(arr, x => '{sum += $x}) }
563+
${ map('arr, x => '{sum += $x}) }
564564
sum
565565
```
566566

@@ -571,7 +571,7 @@ val arr: Array[Int] = Array.apply(1, [2,3 : Int]:Int*)
571571

572572
var sum = 0
573573
val f = x => '{sum += $x}
574-
${ _root_.Macros.map(arr, 'f)('[Int])}
574+
${ _root_.Macros.map('arr, 'f)('[Int])}
575575
sum
576576
```
577577

0 commit comments

Comments
 (0)