diff options
| author | Veikka Tuominen <git@vexu.eu> | 2023-05-10 16:26:54 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2023-05-11 17:23:06 +0300 |
| commit | f0fdaf32d3b802e9db16a0753d9ff49a8667089b (patch) | |
| tree | 5ff1ea4e3897869e3e01e8231acb393b83a7e591 /test/behavior/array.zig | |
| parent | 67afd2a470153681d3a2323ec388e3ecd545cef1 (diff) | |
| download | zig-f0fdaf32d3b802e9db16a0753d9ff49a8667089b.tar.gz zig-f0fdaf32d3b802e9db16a0753d9ff49a8667089b.zip | |
fix incorrect use of mutable pointers to temporary values
Diffstat (limited to 'test/behavior/array.zig')
| -rw-r--r-- | test/behavior/array.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/behavior/array.zig b/test/behavior/array.zig index 6cf0ab9e1d..a54aaa898e 100644 --- a/test/behavior/array.zig +++ b/test/behavior/array.zig @@ -667,7 +667,7 @@ test "array init of container level array variable" { test "runtime initialized sentinel-terminated array literal" { var c: u16 = 300; const f = &[_:0x9999]u16{c}; - const g = @ptrCast(*[4]u8, f); + const g = @ptrCast(*const [4]u8, f); try std.testing.expect(g[2] == 0x99); try std.testing.expect(g[3] == 0x99); } |
