From c697fde0aa120968d8439b79b1a75f84d0ce6777 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 6 Jan 2017 20:24:11 +0800 Subject: MIR Gen Match - Allow single-value ranges --- src/mir/from_hir_match.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mir/from_hir_match.cpp') diff --git a/src/mir/from_hir_match.cpp b/src/mir/from_hir_match.cpp index 29eb391f..620fd368 100644 --- a/src/mir/from_hir_match.cpp +++ b/src/mir/from_hir_match.cpp @@ -2290,8 +2290,7 @@ namespace const char* name, const field_path_t& field_path, ::std::function and_then ) { - 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); + 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. -- cgit v1.2.3