From db5829ef62f4b7215d741b3b5fe4763e9211df34 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 19 Nov 2016 16:51:35 +0800 Subject: MIR Gen Match - HACK: Allow duplicate terminals (ranges) --- src/mir/from_hir_match.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mir/from_hir_match.cpp b/src/mir/from_hir_match.cpp index 15034587..2c7ffcc7 100644 --- a/src/mir/from_hir_match.cpp +++ b/src/mir/from_hir_match.cpp @@ -1759,9 +1759,8 @@ struct DecisionTreeNode } ), (Terminal, - //if( e == arm_index ) // Wut? How would this happen? Exact duplicate pattern - // return ; - BUG(sp, "Duplicate terminal - Existing goes to arm " << e << ", new goes to arm " << arm_index ); + // TODO: This is ok if it's due to overlapping rules (e.g. ranges) + //BUG(sp, "Duplicate terminal - Existing goes to arm " << e << ", new goes to arm " << arm_index ); ) ) branch = Branch::make_Terminal(arm_index); -- cgit v1.2.3