#zig build-obj {
--name test -fno-emit-bin
-Mroot=test.zig
#}

#write test.zig {
const a = @import("a.zig");
const b = @import("b.zig");

export fn entry() void {
    var a1: a.Foo = undefined;
    bar(&a1);
}

fn bar(_: *b.Foo) void {}
#}
#write a.zig {
pub const Foo = struct {
    x: i32,
};
#}
#write b.zig {
pub const Foo = struct {
    z: f64,
};
#}
#update
#check errors {
test.zig:6:9: error: expected type '*b.Foo', found '*a.Foo'
test.zig:6:9: note: pointer type child 'a.Foo' cannot cast into pointer type child 'b.Foo'
a.zig:1:17: note: struct declared here
b.zig:1:17: note: struct declared here
test.zig:9:11: note: parameter type declared here
#}
