diff options
Diffstat (limited to 'src/comp/middle')
| -rw-r--r-- | src/comp/middle/typeck.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 85ee74da..40e39888 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -1186,6 +1186,7 @@ fn demand_pat(&fn_ctxt fcx, @ty expected, @ast.pat pat) -> @ast.pat { } case (ast.pat_bind(?id, ?did, ?ann)) { auto t = demand(fcx, pat.span, expected, ann_to_type(ann)); + fcx.locals.insert(did, t); p_1 = ast.pat_bind(id, did, ast.ann_type(t)); } case (ast.pat_tag(?id, ?subpats, ?vdef_opt, ?ann)) { |