fix(library/match): bug in higher-order matcher
This commit is contained in:
parent
7f8afcf04b
commit
1dedd2829c
2 changed files with 1 additions and 3 deletions
|
@ -178,8 +178,6 @@ class match_fn : public match_context {
|
||||||
p = binding_body(p);
|
p = binding_body(p);
|
||||||
t = binding_body(t);
|
t = binding_body(t);
|
||||||
}
|
}
|
||||||
if (p.kind() == k || t.kind() == k)
|
|
||||||
return false;
|
|
||||||
p = instantiate_rev(p, ls.size(), ls.data());
|
p = instantiate_rev(p, ls.size(), ls.data());
|
||||||
t = instantiate_rev(t, ls.size(), ls.data());
|
t = instantiate_rev(t, ls.size(), ls.data());
|
||||||
return _match(p, t);
|
return _match(p, t);
|
||||||
|
|
|
@ -25,4 +25,4 @@ assert(not match(F0(x), f(x, y)))
|
||||||
local F0 = mk_idx_meta(0, Pi(x, N))
|
local F0 = mk_idx_meta(0, Pi(x, N))
|
||||||
tst_match(Pi(x, y, F0(x)), Pi(x, y, f(f(x))))
|
tst_match(Pi(x, y, F0(x)), Pi(x, y, f(f(x))))
|
||||||
tst_match(Fun(x, y, F0(x)), Fun(x, y, f(f(x))))
|
tst_match(Fun(x, y, F0(x)), Fun(x, y, f(f(x))))
|
||||||
assert(not match(Pi(x, F0(x)), Pi(x, y, f(f(x)))))
|
assert(match(Pi(x, F0(x)), Pi(x, y, f(f(x)))))
|
||||||
|
|
Loading…
Reference in a new issue