Skip to content

Instantly share code, notes, and snippets.

@CurtisFenner
Created May 8, 2020 02:24
Show Gist options
  • Save CurtisFenner/3048d048a225e232329575ba36bb8783 to your computer and use it in GitHub Desktop.
Save CurtisFenner/3048d048a225e232329575ba36bb8783 to your computer and use it in GitHub Desktop.
// >zig version
// 0.6.0
// >zig test src/crash.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};
}
@CurtisFenner
Copy link
Author

A slight variation got a slightly different assert message:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment