Merge pull request #15643 from Vexu/fixes

make `@call` compile errors match regular calls
This commit is contained in:
Veikka Tuominen
2023-05-13 12:52:16 +03:00
committed by GitHub
11 changed files with 230 additions and 132 deletions

View File

@@ -1200,3 +1200,10 @@ test "arrays and vectors with big integers" {
try expect(b[0] == comptime std.math.maxInt(Int));
}
}
test "pointer to struct literal with runtime field is constant" {
const S = struct { data: usize };
var runtime_zero: usize = 0;
const ptr = &S{ .data = runtime_zero };
try expect(@typeInfo(@TypeOf(ptr)).Pointer.is_const);
}