Files
zig/test/cases/compile_errors/offsetOf-bad_field_name.zig
2022-06-30 09:57:38 +02:00

14 lines
234 B
Zig

const Foo = struct {
derp: i32,
};
export fn foo() usize {
return @offsetOf(Foo, "a",);
}
// error
// backend=stage2
// target=native
//
// :5:27: error: struct 'tmp.Foo' has no field 'a'
// :1:13: note: struct declared here