mirror of
https://github.com/ziglang/zig.git
synced 2025-12-25 23:53:15 +00:00
12 lines
241 B
Zig
12 lines
241 B
Zig
const std = @import("std");
|
|
const builtin = @import("builtin");
|
|
|
|
fn foo() u32 {
|
|
return 11227;
|
|
}
|
|
const bar = foo;
|
|
test "pointer to alias behaves same as pointer to function" {
|
|
var a = &bar;
|
|
try std.testing.expect(foo() == a());
|
|
}
|