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

cgen: fix in map_literal (fix #8868) (#8871)

This commit is contained in:
yuyi
2021-02-21 17:54:30 +08:00
committed by GitHub
parent 3907a1ab49
commit 9a744b6750
2 changed files with 10 additions and 3 deletions

View File

@ -131,7 +131,7 @@ fn test_map_init() {
one := 'one'
three := 'three'
m := map{
one: 1
one: 1
'two': 2
three: 1 + 2
}
@ -626,3 +626,9 @@ fn test_map_assign_empty_map_init() {
assert a == map[string]int{}
assert '$a' == '{}'
}
fn test_in_map_literal() {
assert 1 in map{
1: 'one'
}
}