diff options
| author | Timon Kruiper <timonkruiper@gmail.com> | 2019-11-20 19:34:20 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-22 04:00:47 +0000 |
| commit | 94299d16d1443cd8b731e2eba9b4d1e3fb8048bd (patch) | |
| tree | 72e9c47ff8bf53a7abdbe239f41616b880ccc153 /src/range_set.cpp | |
| parent | e3404e3c78307092e849dc0609f77932b263e3fc (diff) | |
| download | zig-94299d16d1443cd8b731e2eba9b4d1e3fb8048bd.tar.gz zig-94299d16d1443cd8b731e2eba9b4d1e3fb8048bd.zip | |
Stage1: Add compile error for an empty switch on a integer
Diffstat (limited to 'src/range_set.cpp')
| -rw-r--r-- | src/range_set.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/range_set.cpp b/src/range_set.cpp index fd0076191b..9e621d2f13 100644 --- a/src/range_set.cpp +++ b/src/range_set.cpp @@ -40,6 +40,9 @@ void rangeset_sort(RangeSet *rs) { } bool rangeset_spans(RangeSet *rs, BigInt *first, BigInt *last) { + if (rs->src_range_list.length == 0) + return false; + rangeset_sort(rs); const Range *first_range = &rs->src_range_list.at(0).range; |
