Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
builtin_maps
/
map_auto_str_ptr_test.v
23
lines
·
18
sloc
·
245 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
module
main
2
3
struct
Blob {
4
label int
5
}
6
7
fn
(
mut
b Blob) str() string {
8
return
''
9
}
10
11
struct
Labels {
12
blobs map[int]Blob
13
}
14
15
fn
break_it() Labels {
16
mut
a := Labels{}
17
return
a
18
}
19
20
fn
test_main() {
21
mut
a := break_it()
22
assert a.blobs.len == 0
23
}
24