1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: change array decompose syntax (#7965)

This commit is contained in:
Daniel Däschle
2021-01-09 22:48:23 +01:00
committed by GitHub
parent 362c21de06
commit a8dd13f086
8 changed files with 17 additions and 12 deletions

View File

@ -245,9 +245,9 @@ println(sum(2,3)) // 5
// using array decomposition
a := [2,3,4]
println(sum(a...)) // <-- using postfix ... here. output: 9
println(sum(...a)) // <-- using prefix ... here. output: 9
b := [5, 6, 7]
println(sum(b...)) // output: 18
println(sum(...b)) // output: 18
```
## Symbol visibility