zig/test/cases/compile_errors/fieldParentPtr-non_struct.zig
2022-06-30 21:47:26 +03:00

11 lines
187 B
Zig

const Foo = i32;
export fn foo(a: *i32) *Foo {
return @fieldParentPtr(Foo, "a", a);
}
// error
// backend=llvm
// target=native
//
// :3:28: error: expected struct type, found 'i32'