aboutsummaryrefslogtreecommitdiff
path: root/doc/langref/test_opaque.zig
blob: f3c49d507a2f7e17c974df5ea8259147790a5a64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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'