diff options
| author | Roy Frostig <[email protected]> | 2010-07-16 18:04:34 -0700 |
|---|---|---|
| committer | Roy Frostig <[email protected]> | 2010-07-16 18:04:34 -0700 |
| commit | c906759807dfe106c7c59f939c7be492b4f16d8f (patch) | |
| tree | 2f4218336824218c41315381863b59a81ea309c5 /src/boot/me/trans.ml | |
| parent | Ensure that functions that should return a value do; issue 41 (diff) | |
| download | rust-c906759807dfe106c7c59f939c7be492b4f16d8f.tar.xz rust-c906759807dfe106c7c59f939c7be492b4f16d8f.zip | |
Fix IL translation of pattern-alt to allow a value of mutable/constrained type to be the subject of a pattern-alt.
Diffstat (limited to 'src/boot/me/trans.ml')
| -rw-r--r-- | src/boot/me/trans.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml index 3d89d795..fec0d6ee 100644 --- a/src/boot/me/trans.ml +++ b/src/boot/me/trans.ml @@ -3961,7 +3961,7 @@ let trans_visitor | Ast.PAT_tag (lval, pats) -> let tag_name = tag_ctor_name_to_tag_name (lval_to_name lval) in let ty_tag = - match src_ty with + match strip_mutable_or_constrained_ty src_ty with Ast.TY_tag tag_ty -> tag_ty | Ast.TY_iso ti -> (ti.Ast.iso_group).(ti.Ast.iso_index) | _ -> bug cx "expected tag type" @@ -4009,8 +4009,8 @@ let trans_visitor | Ast.PAT_wild -> [] (* irrefutable *) in - let (lval_cell, lval_slot) = trans_lval at.Ast.alt_tag_lval in - let next_jumps = trans_pat pat lval_cell lval_slot in + let (lval_cell, lval_ty) = trans_lval at.Ast.alt_tag_lval in + let next_jumps = trans_pat pat lval_cell lval_ty in trans_block block; let last_jump = mark() in emit (Il.jmp Il.JMP Il.CodeNone); |