Skip to content

Commit

Permalink
TcTerm: only warn about missing variables in SMTPats in phase1
Browse files Browse the repository at this point in the history
The pattern could have an implicit that is to be solved by unification
or typeclass resolution, so warning in phase1 could just give false
positives.

Fixes #3081
  • Loading branch information
mtzguido committed Nov 6, 2023
1 parent f4cbb7a commit 439f99e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/typechecker/FStar.TypeChecker.TcTerm.fst
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,8 @@ and tc_value env (e:term) : term
let c, uc, f = tc_comp env c in
let e = {U.arrow bs c with pos=top.pos} in
(* checks the SMT pattern associated with this function is properly defined with regard to context *)
check_smt_pat env e bs c;
if not env.phase1 then
check_smt_pat env e bs c;
(* taking the maximum of the universes of the computation and of all binders *)
let u = S.U_max (uc::us) in
(* create a universe of level u *)
Expand Down

0 comments on commit 439f99e

Please sign in to comment.