1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/compiler/tests/voidptr_to_u64_cast_a_test.v

12 lines
202 B
V

fn receive_addr_return_u64 (addr voidptr) u64 {
return u64(addr)
}
fn test_void_pointer_to_u64_cast_via_fn_call() {
a := u64(10)
b := voidptr(a)
c := receive_addr_return_u64(b)
assert (a == c)
}