-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Incorrect error message when concatting sliced comptime only type #5293
Copy link
Copy link
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Milestone
Description
The following program crashes with the given output on my Windows 10 computer:
>zig version
0.6.0
>zig test src/min.zig
Unreachable at D:\a\1\s\src\ir.cpp:28528 in buf_write_value_bytes. This is a bug in the Zig compiler.
Unable to dump stack trace: debug info stripped
const S = struct {};
test "Crashes" {
const cc = &[_]type{ S, S };
const init = cc[0..1];
const dd = init ++ [_]type{S};
}This is a slightly different error message from what I started with:
Unreachable at D:\a\1\s\src\ir.cpp:28562 in buf_write_value_bytes. This is a bug in the Zig compiler.
That version used a const struct { field: type } instead of type directly, which may or may not be the cause of the difference.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior