diff options
| author | Kathy Gray | 2015-11-10 16:26:30 +0000 |
|---|---|---|
| committer | Kathy Gray | 2015-11-10 16:26:30 +0000 |
| commit | afb10f429248912984a7915bf05c58de85ea5cbb (patch) | |
| tree | 68af94939691c4bbd22a08e49d3f717ea3ab95f7 /src | |
| parent | 3a94b84be7f1a4180412fb474e9829a8fad9d7e6 (diff) | |
More tag refinement for lexp
Diffstat (limited to 'src')
| -rw-r--r-- | src/type_check.ml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/type_check.ml b/src/type_check.ml index 37d9ba19..7da777cc 100644 --- a/src/type_check.ml +++ b/src/type_check.ml @@ -1538,7 +1538,8 @@ and check_lexp envs imp_param is_top (LEXP_aux(lexp,(l,annot))) | Tapp("register",[TA_typ t]) | Tabbrev(_,{t=Tapp("register",[TA_typ t])}) -> t,true,false | Tapp("reg",[TA_typ t]) -> t,false,false | _ -> item_t,false,true in - let ef,tag = if add_reg_write then (add_effect (BE_aux(BE_wreg,l)) efl,External None) else (efl,tag) in + let ef,tag = if add_reg_write then (add_effect (BE_aux(BE_wreg,l)) efl,External None) + else match tag with | External _ -> (efl,Emp_local) | _ -> (efl,tag) in if is_top && reg_still_required && reg_required then typ_error l "Assignment expected a register or non-parameter non-letbound identifier to mutate" else |
