feat(library/elaborator): add extra occurs-check test
The idea is to catch the inconsistency in constraints such as: ctx |- ?m[inst:0 v] == fun x, ?m a x Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
160a8379ef
commit
bdbf85405a
1 changed files with 4 additions and 0 deletions
|
@ -428,6 +428,10 @@ class elaborator::imp {
|
|||
return assign(a, b, c, is_lhs) ? Processed : Failed;
|
||||
}
|
||||
} else {
|
||||
if (!is_metavar(b) && has_metavar(b, a)) {
|
||||
m_conflict = justification(new unification_failure_justification(c));
|
||||
return Failed;
|
||||
}
|
||||
local_entry const & me = head(metavar_lctx(a));
|
||||
if (me.is_lift()) {
|
||||
if (!has_free_var(b, me.s(), me.s() + me.n(), m_state.m_menv)) {
|
||||
|
|
Loading…
Reference in a new issue