v2 / vlib / v / tests / nested_map_of_fn_call_test.v
9 lines · 9 sloc · 168 bytes · 89f3288fb083f37e00f1e061baa11913c0964505
Raw
1fn test_nested_map_of_fn_call() {
2 mut a := map[string]map[string]fn () int{}
3 a['a']['a'] = fn () int {
4 return 0
5 }
6 b := a['a']['a']()
7 println(b)
8 assert b == 0
9}
10