| author | |
| committer | |
| log | 8fef23a5250efc38b16b720f298a61d793ace4e3 |
| tree | 9f53f4da38dc1f8ce513e9e6caca6f3ba15893d6 |
| parent | 35a374efe034ae5ed9aafc06bbc581044e7325de |
| signature |
closes #13102 files changed, 25 insertions(+), 0 deletions(-)
test/stage1/behavior.zig+1| ... | ... | @@ -15,6 +15,7 @@ comptime { |
| 15 | 15 | _ = @import("behavior/bugs/1111.zig"); |
| 16 | 16 | _ = @import("behavior/bugs/1120.zig"); |
| 17 | 17 | _ = @import("behavior/bugs/1277.zig"); |
| 18 | _ = @import("behavior/bugs/1310.zig"); | |
| 18 | 19 | _ = @import("behavior/bugs/1322.zig"); |
| 19 | 20 | _ = @import("behavior/bugs/1381.zig"); |
| 20 | 21 | _ = @import("behavior/bugs/1421.zig"); |
test/stage1/behavior/bugs/1310.zig created+24| ... | ... | @@ -0,0 +1,24 @@ |
| 1 | const std = @import("std"); | |
| 2 | const expect = std.testing.expect; | |
| 3 | ||
| 4 | pub const VM = ?[*]const struct_InvocationTable_; | |
| 5 | pub const struct_InvocationTable_ = extern struct { | |
| 6 | GetVM: ?extern fn (?[*]VM) c_int, | |
| 7 | }; | |
| 8 | ||
| 9 | pub const struct_VM_ = extern struct { | |
| 10 | functions: ?[*]const struct_InvocationTable_, | |
| 11 | }; | |
| 12 | ||
| 13 | //excised output from stdlib.h etc | |
| 14 | ||
| 15 | pub const InvocationTable_ = struct_InvocationTable_; | |
| 16 | pub const VM_ = struct_VM_; | |
| 17 | ||
| 18 | extern fn agent_callback(_vm: [*]VM, options: [*]u8) i32 { | |
| 19 | return 11; | |
| 20 | } | |
| 21 | ||
| 22 | test "fixed" { | |
| 23 | expect(agent_callback(undefined, undefined) == 11); | |
| 24 | } |