Skip to content

Commit 8c82b4d

Browse files
oskgostrub
authored andcommitted
emit proper error message when typing ={pvar} in a single sided context
1 parent b09b7ae commit 8c82b4d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/ecTyping.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3241,7 +3241,9 @@ and trans_form_or_pattern env mode ?mv ?ps ue pf tt =
32413241

32423242
let do1 = function
32433243
| GVvar x ->
3244-
let ml, mr = oget (EcEnv.Memory.get_active_ts env) in
3244+
let ml, mr = match (EcEnv.Memory.get_active_ts env) with
3245+
| Some (ml, mr) -> ml, mr
3246+
| None -> tyerror f.pl_loc env (UnexpectedGoalShape GSE_ExpectedTwoSided) in
32453247
let x1 = lookup ml (qual (om |> omap fst) x) in
32463248
let x2 = lookup mr (qual (om |> omap snd) x) in
32473249
unify_or_fail env ue x.pl_loc ~expct:x1.f_ty x2.f_ty;

0 commit comments

Comments
 (0)