mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 09:02:32 +00:00
14 lines
244 B
Zig
14 lines
244 B
Zig
const Derp = opaque {};
|
|
const Wat = opaque {};
|
|
|
|
extern fn bar(d: *Derp) void;
|
|
fn foo(w: *Wat) callconv(.C) void {
|
|
bar(w);
|
|
}
|
|
|
|
test "call foo" {
|
|
foo(undefined);
|
|
}
|
|
|
|
// test_error=expected type '*test_opaque.Derp', found '*test_opaque.Wat'
|