chore(inductive_compiler/mutual): better error message for non-positive occurrences
This commit is contained in:
parent
3d2ff8a76d
commit
6b8583ecac
1 changed files with 3 additions and 0 deletions
|
|
@ -206,6 +206,9 @@ class add_mutual_inductive_decl_fn {
|
|||
expr ty = m_tctx.whnf(arg_type);
|
||||
buffer<expr> locals;
|
||||
while (is_pi(ty)) {
|
||||
if (translate_ind_app(binding_domain(ty))) {
|
||||
throw exception(sstream() << "invalid mutually inductive type, non-positive occurrence in introduction rule: " << arg_type);
|
||||
}
|
||||
expr l = mk_local_for(ty);
|
||||
locals.push_back(l);
|
||||
ty = instantiate(binding_body(ty), l);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue