mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
12 lines
257 B
Zig
12 lines
257 B
Zig
const T = struct { x: u32 };
|
|
export fn foo() void {
|
|
const a = .{ .x = 123 };
|
|
_ = @as(T, a);
|
|
}
|
|
|
|
// error
|
|
//
|
|
// :4:16: error: expected type 'tmp.T', found 'tmp.foo__struct_457'
|
|
// :3:16: note: struct declared here
|
|
// :1:11: note: struct declared here
|