mirror of
https://github.com/ziglang/zig.git
synced 2025-12-11 00:33:08 +00:00
14 lines
255 B
Zig
14 lines
255 B
Zig
const Foo = extern struct {
|
|
derp: i32,
|
|
};
|
|
export fn foo(a: *i32) *Foo {
|
|
return @fieldParentPtr("a", a);
|
|
}
|
|
|
|
// error
|
|
// backend=stage2
|
|
// target=native
|
|
//
|
|
// :5:28: error: no field named 'a' in struct 'tmp.Foo'
|
|
// :1:20: note: struct declared here
|