diff options
| author | Graydon Hoare <[email protected]> | 2011-02-10 17:33:08 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-02-10 17:33:08 -0800 |
| commit | 7c25fb5628c398b79b9293b6b31d62936dcba613 (patch) | |
| tree | a828950d73268acc5a7f95048106b331d08b09f5 /src/comp/middle | |
| parent | Add type checking for native types. (diff) | |
| download | rust-7c25fb5628c398b79b9293b6b31d62936dcba613.tar.xz rust-7c25fb5628c398b79b9293b6b31d62936dcba613.zip | |
Fix bug in trans_field, un-XFAIL two more tests.
Diffstat (limited to 'src/comp/middle')
| -rw-r--r-- | src/comp/middle/trans.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 6399b900..4135a6e5 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -2376,10 +2376,8 @@ fn trans_path(@block_ctxt cx, &ast.path p, &option.t[ast.def] dopt, fn trans_field(@block_ctxt cx, &ast.span sp, @ast.expr base, &ast.ident field, &ast.ann ann) -> lval_result { - auto lv = trans_lval(cx, base); - auto r = lv.res; + auto r = trans_expr(cx, base); r = autoderef(r.bcx, r.val, ty.expr_ty(base)); - check (lv.is_mem); auto t = ty.expr_ty(base); alt (t.struct) { case (ty.ty_tup(?fields)) { |