diff options
author | John Hodge <tpg@mutabah.net> | 2016-11-19 16:51:35 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-11-19 16:51:35 +0800 |
commit | db5829ef62f4b7215d741b3b5fe4763e9211df34 (patch) | |
tree | 4feb000108d2db6252569f8a051ae21a6bcfa7db /src/mir/from_hir_match.cpp | |
parent | da1552c48ebc9ae2c0a9a891bdb01491dffb0ff3 (diff) | |
download | mrust-db5829ef62f4b7215d741b3b5fe4763e9211df34.tar.gz |
MIR Gen Match - HACK: Allow duplicate terminals (ranges)
Diffstat (limited to 'src/mir/from_hir_match.cpp')
-rw-r--r-- | src/mir/from_hir_match.cpp | 5 |
1 files 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); |