Commit f27805ad authored by Jeff Smits's avatar Jeff Smits

Handle empty sequences

parent 514993df
......@@ -363,7 +363,11 @@ impl<'s> CTreeOptimize for preprocess::Strategy<'s> {
strats2.push(strat);
}
Strategy::Seq(strats2.into_boxed_slice())
if strats2.is_empty() {
Strategy::Id
} else {
Strategy::Seq(strats2.into_boxed_slice())
}
}
Strategy::GuardedLChoice(pairs, final_else) => {
use std::rc::Rc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment