Sema: allow .ptr on pointer to array

This commit is contained in:
Veikka Tuominen
2024-03-19 16:14:49 +02:00
parent fda9a32fef
commit 2d443cdabf
2 changed files with 32 additions and 1 deletions

View File

@@ -709,7 +709,7 @@ test "pointer to array has ptr field" {
try std.testing.expect(arr.ptr[1] == 20);
try std.testing.expect(arr.ptr[2] == 30);
try std.testing.expect(arr.ptr[3] == 40);
try std.testing.expect(arr.ptr[4] == 50);
try std.testing.expect((&arr.ptr).*[4] == 50);
}
test "discarded array init preserves result location" {