Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
checker
/
tests
/
alias_map_unknown_op_overloading_err.vv
21
lines
·
18
sloc
·
245 bytes
·
0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1
type Map = map[string]string
2
3
pub fn new_map() Map {
4
return Map({
5
'23': 'str'
6
})
7
}
8
9
fn (a Map) + (b Map) Map {
10
str := b['23']
11
return Map({
12
'34': str + '12'
13
})
14
}
15
16
fn main() {
17
mut a := new_map()
18
b := new_map()
19
println(a - b)
20
a -= b
21
}
22