mirror of
https://github.com/ziglang/zig.git
synced 2025-12-26 16:13:07 +00:00
14 lines
218 B
Zig
14 lines
218 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 {
|
|
const x = &foo;
|
|
x(true);
|
|
try expect(ok);
|
|
}
|