aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/bugs/11227.zig
blob: b65a64c69c3d52110fe1812b382829b51c3d3aed (plain)
1
2
3
4
5
6
7
8
9
10
11
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());
}