dataflow: fix flow of information through pattern variants

This commit is contained in:
Niko Matsakis 2013-04-30 14:07:26 -04:00
parent a896440ca1
commit aa48a170d5

View file

@ -846,10 +846,9 @@ impl<'self, O:DataFlowOperator> PropagationContext<'self, O> {
// alternatives, so we must treat this like an N-way select
// statement.
let initial_state = reslice(in_out).to_vec();
self.reset(in_out);
for pats.each |&pat| {
let mut temp = copy initial_state;
self.walk_pat(pat, in_out, loop_scopes);
self.walk_pat(pat, temp, loop_scopes);
join_bits(&self.dfcx.oper, temp, in_out);
}
}