0 issues 1 contributor 4 branches 0 releases
Additions: 15 Deletions: 2 View patch
1 println(m2)
2 assert '$m2' == "{'A': [1.1, 2.2]}"
3 }
4+
5+type Map = map[int]int
6+
7+fn test_alias_of_map_delete() {
8+ mut m := Map(map[int]int{})
9+ m[11] = 111
10+ m[22] = 222
11+ println(m)
12+ m.delete(11)
13+ println(m)
14+ assert m.len == 1
15+ assert m[22] == 222
16+}
17
1 }
2 }
3
4- if left_sym.kind == .map && node.name == 'delete' {
5- left_info := left_sym.info as ast.Map
6+ if final_left_sym.kind == .map && node.name == 'delete' {
7+ left_info := final_left_sym.info as ast.Map
8 elem_type_str := g.typ(left_info.key_type)
9 g.write('map_delete(')
10 if left_type.has_flag(.shared_f) {
11