v2 / vlib / v / tests / pointers / double_ref_deref_test.v
10 lines · 9 sloc · 133 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1fn process(foo &&int) int {
2 return **foo
3}
4
5fn test_ref_deref() {
6 foo := 12
7 bar := &foo
8 fiz := process(&bar)
9 assert fiz == 12
10}
11