zig/test/cases/cast.zig
2017-01-05 03:57:48 -05:00

11 lines
184 B
Zig

const assert = @import("std").debug.assert;
fn intToPtrCast() {
@setFnTest(this);
const x = isize(13);
const y = (&u8)(x);
const z = usize(y);
assert(z == 13);
}