-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Description
Zig Version
0.13.0-dev.73+db890dbae
Steps to Reproduce and Observed Behavior
Missing case for #18924
const std = @import("std");
const expectEqual = std.testing.expectEqual;
test "ref to anon array init coerced to many-c-ptr" {
const values: [*c]const i32 = &.{ 5, -6 };
try expectEqual(5, values[0]);
try expectEqual(-6, values[1]);
}Fails to compile:
error: type 'i32' does not support array initialization syntax
const values: [*c]const i32 = &.{ 5, -6 };
Expected Behavior
Expected test to pass
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.