v2 / vlib / v / slow_tests / inout / dump_nil_voidptr.vv
14 lines · 12 sloc · 171 bytes · 6a32c810703f4ec0c39fe18298ebe6c40acac8f1
Raw
1fn get_nil() ?&int {
2 return unsafe { nil }
3}
4
5fn get_voidptr() ?&int {
6 return unsafe { nil }
7}
8
9fn main() {
10 mut a := get_nil()?
11 dump(a)
12 a = get_voidptr()?
13 dump(a)
14}
15