Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
casts
/
voidptr_to_u64_cast_a_test.v
10
lines
·
9
sloc
·
198 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
fn
receive_addr_return_u64(addr voidptr) u64 {
2
return
u64(addr)
3
}
4
5
fn
test_void_pointer_to_u64_cast_via_fn_call() {
6
a := u64(10)
7
b := voidptr(a)
8
c := receive_addr_return_u64(b)
9
assert a == c
10
}
11