zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

test_opaque.zig (244B) - Raw


      1 const Derp = opaque {};
      2 const Wat = opaque {};
      3 
      4 extern fn bar(d: *Derp) void;
      5 fn foo(w: *Wat) callconv(.c) void {
      6     bar(w);
      7 }
      8 
      9 test "call foo" {
     10     foo(undefined);
     11 }
     12 
     13 // test_error=expected type '*test_opaque.Derp', found '*test_opaque.Wat'