fix(library/unifier): in the context_check, we should not consider local constants that occur in the type of other constants
This was a performance bug. We were missing higher-order pattern constraints due to this bug.
This commit is contained in:
parent
1042bbc06f
commit
7e2f0f9a36
1 changed files with 4 additions and 3 deletions
|
@ -118,9 +118,10 @@ bool context_check(expr const & e, buffer<expr> const & locals) {
|
|||
for_each(e, [&](expr const & e, unsigned) {
|
||||
if (failed)
|
||||
return false;
|
||||
if (is_local(e) && !contains_local(e, locals)) {
|
||||
failed = true;
|
||||
return false;
|
||||
if (is_local(e)) {
|
||||
if (!contains_local(e, locals))
|
||||
failed = true;
|
||||
return false; // do not visit type
|
||||
}
|
||||
if (is_metavar(e))
|
||||
return false; // do not visit type
|
||||
|
|
Loading…
Reference in a new issue