aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/bugs/655.zig
blob: 9ec9f01e698ed35a263f9572a36d9ae0891f8b74 (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;
    comptime try 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);
}