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

parser: fix mutable map args

This commit is contained in:
Alexander Medvednikov
2019-11-12 22:35:53 +03:00
parent 19c9e226a3
commit 10b0432eca
3 changed files with 19 additions and 5 deletions

View File

@@ -158,6 +158,16 @@ fn test_string_arr() {
assert m['a'][1] == 'two'
}
fn mut_map(m mut map[string]int) {
m['a'] = 10
}
fn test_mut_arg() {
mut m := map[string]int
mut_map(mut m)
assert m['a'] == 10
}
/*
fn test_ref() {
m := { 'one': 1 }