mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parent
522d875489
commit
d44c632d11
@ -2005,6 +2005,7 @@ fn (mut g Gen) gen_assign_stmt(assign_stmt ast.AssignStmt) {
|
||||
}
|
||||
}
|
||||
}
|
||||
g.is_assign_lhs = false
|
||||
} else {
|
||||
is_inside_ternary := g.inside_ternary != 0
|
||||
cur_line := if is_inside_ternary && is_decl {
|
||||
|
@ -8,3 +8,12 @@ fn test_complex_map_fixed_array() {
|
||||
println(m)
|
||||
assert '$m' == "{'foo': [[{'bar': 1}, {'baz': 3}]]}"
|
||||
}
|
||||
|
||||
fn test_innermost_value_of_map_fixed_array() {
|
||||
mut m := map[string][1][2]map[string]int
|
||||
m['foo'] = [[{'bar': 1}, {'baz': 3}]!]!
|
||||
println(m['foo'][0][0]['bar'])
|
||||
println(m['foo'][0][0]['bar'] == 1)
|
||||
assert m['foo'][0][0]['bar'] == 1
|
||||
assert '${m['foo'][0][0]['bar']}' == '1'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user