Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
offsetOf-bad_field_name.zig
pretty
plain
permalink
blame
history
•
14 lines
•
225 B
1
const Foo = struct {
2
derp: i32,
3
};
4
export fn foo() usize {
5
return @offsetOf(
6
Foo,
7
"a",
8
);
9
}
10
11
// error
12
//
13
// :7:9: error: no field named 'a' in struct 'tmp.Foo'
14
// :1:13: note: struct declared here