From 844fe207206b6708f2a7e05214857c92c4b7d28b Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Wed, 27 Apr 2011 14:55:55 -0700 Subject: Fix some nested patterns in rustc In rustc, nested patterns were potentially matching when they shouldn't match, because a loop index wasn't being incremented. Fixed it and added one test case. --- src/comp/middle/trans.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/comp') diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 75c7aa84..a37308dd 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -3772,6 +3772,8 @@ fn trans_pat_match(@block_ctxt cx, @ast.pat pat, ValueRef llval, auto subpat_res = trans_pat_match(matched_cx, subpat, llsubval, next_cx); matched_cx = subpat_res.bcx; + + i += 1; } } -- cgit v1.2.3