Zig Version
0.14.0
Steps to Reproduce and Observed Behavior
Try to compile code like the following (with zig build-obj):
export fn foo() u32 {
return 123456;
}
export fn bar() u16 {
const inner = struct {
extern fn foo() u16;
};
return inner.foo();
}
It compiles successfully.
Expected Behavior
There should be an error because the declaration and definition of foo don't match.