aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/bugs/655.zig
blob: d958513e6fd66faf7d0efe59b5fc691edaaabf4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
const std = @import("std");
const other_file = @import("655_other_file.zig");

test "function with *const parameter with type dereferenced by namespace" {
    const x: other_file.Integer = 1234;
    try comptime std.testing.expect(@TypeOf(&x) == *const other_file.Integer);
    try foo(&x);
}

fn foo(x: *const other_file.Integer) !void {
    try std.testing.expect(x.* == 1234);
}