Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
bitCast_extern_struct.zig
pretty
plain
permalink
blame
history
•
10 lines
•
214 B
1
const S = extern struct { x: u32 };
2
export fn foo(s: S) void {
3
const as_int: u32 = @bitCast(s);
4
_ = as_int;
5
}
6
7
// error
8
//
9
// :3:34: error: cannot @bitCast from 'tmp.S'
10
// :1:18: note: struct declared here