diff options
| author | Brian Campbell | 2017-06-28 17:29:32 +0100 |
|---|---|---|
| committer | Brian Campbell | 2017-06-28 17:29:32 +0100 |
| commit | 8a3c9dfc84e552d296c80c38b417c2b22e6f1da8 (patch) | |
| tree | 04cd21041bdf47e1745f174308815b467f1401f5 /src | |
| parent | 6779d3d45e1bd33fee6a069808170a1321da1f66 (diff) | |
Use more plausible type for E_case
(Previously it used the last branch's type!)
Diffstat (limited to 'src')
| -rw-r--r-- | src/type_check.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type_check.ml b/src/type_check.ml index c4119281..e285477a 100644 --- a/src/type_check.ml +++ b/src/type_check.ml @@ -1593,7 +1593,7 @@ let rec check_exp envs (imp_param:nexp option) (widen_num:bool) (widen_vec:bool) let (pexps',t,cs',ef') = check_cases envs imp_param ret_t t' expect_t (if (List.length pexps) = 1 then Solo else Switch) pexps in let effects = union_effects ef ef' in - (E_aux(E_case(e',pexps'),(l,simple_annot_efr t effects)),t, + (E_aux(E_case(e',pexps'),(l,simple_annot_efr expect_t effects)),t, t_env,cs@[BranchCons(Expr l, None, cs')],nob,effects) | E_let(lbind,body) -> let (lb',t_env',cs,b_env',ef) = (check_lbind envs imp_param false (Some ret_t) Emp_local lbind) in |
