v2 / vlib / v / checker / tests / voidptr_dereference_err.vv
6 lines · 6 sloc · 86 bytes · cf42ba2b800c061b91d0c96080cc26afd533c743
Raw
1fn main() {
2 mut a := unsafe { voidptr(u64(0)) }
3 mut b := 123
4 a = &b
5 println(*a)
6}
7