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

cgen: fix map_in error

This commit is contained in:
yuyi
2020-06-25 18:53:12 +08:00
committed by GitHub
parent 5e9c154376
commit f1e17f30f6
2 changed files with 13 additions and 4 deletions

View File

@ -276,3 +276,10 @@ fn test_assign_directly() {
a['aaa'] -= 2
assert a['aaa'] == 2
}
fn test_map_in_directly() {
for k, v in {'aa': 1} {
assert k == 'aa'
assert v == 1
}
}