Skip to content

Commit

Permalink
fix: use infer type config when checking types at metavariable assign…
Browse files Browse the repository at this point in the history
…ment

This PR fixes an issue at `isDefEq`. We must use the liberal infer
type `MetaM` config when checking types at the assignment `?m := v`.
  • Loading branch information
leodemoura committed Nov 22, 2024
1 parent 81a1eb2 commit 9cf4541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lean/Meta/ExprDefEq.lean
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ private def checkTypesAndAssign (mvar : Expr) (v : Expr) : MetaM Bool :=
-- must check whether types are definitionally equal or not, before assigning and returning true
let mvarType ← inferType mvar
let vType ← inferType v
if (← withTransparency TransparencyMode.default <| Meta.isExprDefEqAux mvarType vType) then
if (← withAtLeastTransparency .default <| withInferTypeConfig <| Meta.isExprDefEqAux mvarType vType) then
mvar.mvarId!.assign v
pure true
else
Expand Down

0 comments on commit 9cf4541

Please sign in to comment.