roc
roc copied to clipboard
new compiler: panic: arrays out of sync
module []
bool_list = [True, False]
❯ ./zig-out/bin/roc check temp2.roc
thread 6107 panic: Arrays out of sync:
type_nodes=83
region_nodes=80
/home/username/gitrepos/roc/src/check/check_types.zig:121:28: 0x11a8458 in processSourceInternal (roc)
std.debug.panic(
^
/home/username/gitrepos/roc/src/coordinate_simple.zig:112:63: 0x11c0ae7 in processFile (roc)
var process_result = try processSourceInternal(gpa, returned.source, filepath, config);
^
/home/username/gitrepos/roc/src/main.zig:224:55: 0x11c608b in rocCheck (roc)
var process_result = coordinate_simple.processFile(gpa, Filesystem.default(), args.path, if (cache_manager) |*cm| cm else null, args.time) catch |err| handleProcessFileError(err, stderr, args.path);
^
/home/username/gitrepos/roc/src/main.zig:65:40: 0x11d3874 in mainArgs (roc)
.check => |check_args| rocCheck(gpa, check_args),
^
...
Another reproducer:
module []
last = |l|
match l {
[] -> Err(ListWasEmpty)
[.., e] -> Ok(e)
}
Even simpler:
module []
foo = Bool.T
Note: the original example for this issue no longer reproduces. But it does if it is like this:
module []
bool_list = [T, F]