disable assertions in smallestEnclosingSubrange
This commit is contained in:
parent
99cd67e183
commit
d2287816a7
@ -1642,10 +1642,11 @@ pub fn smallestEnclosingSubrange(children: []const offsets.Loc, loc: offsets.Loc
|
|||||||
0 => return null,
|
0 => return null,
|
||||||
1 => return if (offsets.locInside(loc, children[0])) .{ .start = 0, .len = 1 } else null,
|
1 => return if (offsets.locInside(loc, children[0])) .{ .start = 0, .len = 1 } else null,
|
||||||
else => {
|
else => {
|
||||||
for (children[0 .. children.len - 1], children[1..]) |previous_loc, current_loc| {
|
// TODO re-enable checks once parsing conforms to these assumptions
|
||||||
std.debug.assert(previous_loc.end <= current_loc.start); // must by sorted
|
// for (children[0 .. children.len - 1], children[1..]) |previous_loc, current_loc| {
|
||||||
std.debug.assert(!offsets.locIntersect(previous_loc, current_loc)); // must be non-intersecting
|
// 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
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user