mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
12 lines
202 B
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)
|
||
|
}
|
||
|
|