Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
checker
/
tests
/
array_of_refs_insert_non_ref.vv
18
lines
·
16
sloc
·
169 bytes
·
84152cc709fe2b293a885cd5a4cebde7f599d1fd
Raw
1
struct Dummy {
2
v int
3
}
4
5
@[heap]
6
struct Container {
7
mut:
8
vals []&Dummy
9
}
10
11
fn main() {
12
mut c := &Container{}
13
d := Dummy{
14
v: 1
15
}
16
c.vals << d
17
c.vals.insert(0, d)
18
}
19