summaryrefslogtreecommitdiff
path: root/src/mir/from_hir_match.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir/from_hir_match.cpp')
-rw-r--r--src/mir/from_hir_match.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mir/from_hir_match.cpp b/src/mir/from_hir_match.cpp
index c26dbc41..68f4f24b 100644
--- a/src/mir/from_hir_match.cpp
+++ b/src/mir/from_hir_match.cpp
@@ -2156,7 +2156,8 @@ namespace
const char* name, const field_path_t& field_path, ::std::function<void(DecisionTreeNode::Branch&)> and_then
)
{
- ASSERT_BUG(sp, ve_start < ve_end, "Range pattern with one value - " << ve_start << "..." << ve_end);
+ ASSERT_BUG(sp, ve_start != ve_end, "Range pattern with one value - " << ve_start);
+ ASSERT_BUG(sp, ve_start < ve_end, "Range pattern with a start after the end - " << ve_start << "..." << ve_end);
TRACE_FUNCTION_F("[" << FMT_CB(os, for(const auto& i:be) os << i.first <<" , ";) << "]");
// - Find the first entry that ends after the new one starts.