mirror of
https://github.com/ziglang/zig.git
synced 2025-12-27 16:43:07 +00:00
16 lines
293 B
Zig
16 lines
293 B
Zig
const std = @import("std");
|
|
const builtin = @import("builtin");
|
|
const expect = std.testing.expect;
|
|
|
|
var ok = false;
|
|
fn foo(x: anytype) void {
|
|
ok = x;
|
|
}
|
|
test {
|
|
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
|
|
|
const x = &foo;
|
|
x(true);
|
|
try expect(ok);
|
|
}
|