fix(frontends/lean/structure_cmd): when error recovery is enabled, we must not assume the expression in the fixed line is a binding expression (it may be a sorry expression)
This commit is contained in:
parent
ddee94b831
commit
61254847fb
1 changed files with 2 additions and 0 deletions
|
|
@ -323,6 +323,8 @@ struct structure_cmd_fn {
|
|||
*/
|
||||
expr update_locals(expr new_tmp, buffer<expr> & locals) {
|
||||
for (unsigned i = 0; i < locals.size(); i++) {
|
||||
if (!is_binding(new_tmp))
|
||||
throw exception("structure command elaboration was interrupted due to nested errors");
|
||||
expr new_local = mk_local(mlocal_name(locals[i]), binding_name(new_tmp), binding_domain(new_tmp),
|
||||
binding_info(new_tmp));
|
||||
locals[i] = new_local;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue