mirror of
https://github.com/ziglang/zig.git
synced 2026-01-13 10:55:11 +00:00
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
13 lines
369 B
Zig
13 lines
369 B
Zig
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 std.testing.expect(@TypeOf(&x) == *const other_file.Integer);
|
|
foo(&x);
|
|
}
|
|
|
|
fn foo(x: *const other_file.Integer) void {
|
|
std.testing.expect(x.* == 1234);
|
|
}
|