From f0fdaf32d3b802e9db16a0753d9ff49a8667089b Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Wed, 10 May 2023 16:26:54 +0300 Subject: fix incorrect use of mutable pointers to temporary values --- test/behavior/array.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/behavior/array.zig') 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); } -- cgit v1.2.3