diff options
| author | Patrick Walton <[email protected]> | 2011-03-08 14:55:39 -0800 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-03-08 14:55:39 -0800 |
| commit | da9ea9ab69ebcf32ff9cc1ad557a6c2a5134bd0d (patch) | |
| tree | f5499480dab04259e5137eed10342acb5e9a271f /src/comp/middle/trans.rs | |
| parent | rustc: Re-XFAIL rec-extend.rs. The typechecker never assigned the path expr a... (diff) | |
| download | rust-da9ea9ab69ebcf32ff9cc1ad557a6c2a5134bd0d.tar.xz rust-da9ea9ab69ebcf32ff9cc1ad557a6c2a5134bd0d.zip | |
rustc: Move type parameter resolution from translation into the typechecker
Diffstat (limited to 'src/comp/middle/trans.rs')
| -rw-r--r-- | src/comp/middle/trans.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 7457a532..4064cc0a 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -3083,8 +3083,19 @@ fn lval_generic_fn(@block_ctxt cx, check (cx.fcx.ccx.fn_pairs.contains_key(fn_id)); auto lv = lval_val(cx, cx.fcx.ccx.fn_pairs.get(fn_id)); - auto monoty = node_ann_type(cx.fcx.ccx, ann); - auto tys = ty.resolve_ty_params(tpt, monoty); + + auto monoty; + auto tys; + alt (ann) { + case (ast.ann_none) { + cx.fcx.ccx.sess.bug("no type annotation for path!"); + fail; + } + case (ast.ann_type(?monoty_, ?tps)) { + monoty = monoty_; + tys = option.get[vec[@ty.t]](tps); + } + } if (_vec.len[@ty.t](tys) != 0u) { auto bcx = cx; |