feat(library/type_context): avoid typing errors due to reducibility when checking types at metavariable assignment
This commit is contained in:
parent
044fe965da
commit
1395bebc44
1 changed files with 9 additions and 0 deletions
|
|
@ -1778,6 +1778,15 @@ bool type_context::process_assignment(expr const & m, expr const & v) {
|
|||
try {
|
||||
expr t1 = infer(mvar);
|
||||
expr t2 = infer(new_v);
|
||||
/* TODO(Leo): check whether using transparency_mode::All hurts performance.
|
||||
We use Semireducible to make sure we will not fail an unification step
|
||||
?m := t
|
||||
because we cannot establish that the types of ?m and t are definitionally equal
|
||||
due to the current transparency setting.
|
||||
This change is consistent with the general approach used in the rest of the code
|
||||
base where spurious typing errors due reducibility are avoided by using
|
||||
relaxed_is_def_eq. */
|
||||
transparency_scope _(*this, transparency_mode::All);
|
||||
if (!is_def_eq_core(t1, t2)) {
|
||||
lean_trace(name({"type_context", "is_def_eq_detail"}),
|
||||
scope_trace_env scope(env(), *this);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue