From d2287816a743d8f4131228f26d0ff664e1012282 Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:17:32 +0200 Subject: [PATCH] disable assertions in smallestEnclosingSubrange --- src/ast.zig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ast.zig b/src/ast.zig index 35143d0..588dbe5 100644 --- a/src/ast.zig +++ b/src/ast.zig @@ -1642,10 +1642,11 @@ pub fn smallestEnclosingSubrange(children: []const offsets.Loc, loc: offsets.Loc 0 => return null, 1 => return if (offsets.locInside(loc, children[0])) .{ .start = 0, .len = 1 } else null, else => { - for (children[0 .. children.len - 1], children[1..]) |previous_loc, current_loc| { - std.debug.assert(previous_loc.end <= current_loc.start); // must by sorted - std.debug.assert(!offsets.locIntersect(previous_loc, current_loc)); // must be non-intersecting - } + // TODO re-enable checks once parsing conforms to these assumptions + // for (children[0 .. children.len - 1], children[1..]) |previous_loc, current_loc| { + // std.debug.assert(previous_loc.end <= current_loc.start); // must be sorted + // std.debug.assert(!offsets.locIntersect(previous_loc, current_loc)); // must be non-intersecting + // } }, }