zig/test/cases/compile_errors/fieldParentPtr-non_pointer.zig
2024-03-30 20:50:48 -04:00

10 lines
182 B
Zig

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