fix(frontends/lean/builtin_cmds): abort eval after error recovery and complain about unsynthesized mvars early

This commit is contained in:
Sebastian Ullrich 2017-05-31 16:05:47 +02:00
parent 9fa31b2858
commit f820f3f97e

View file

@ -432,9 +432,9 @@ static environment compile_cmd(parser & p) {
static environment eval_cmd(parser & p) {
auto pos = p.pos();
expr e; level_param_names ls;
std::tie(e, ls) = parse_local_expr(p, "_eval");
if (has_metavar(e))
throw parser_error("invalid eval command, expression contains metavariables", pos);
std::tie(e, ls) = parse_local_expr(p, "_eval", /* relaxed */ false);
if (has_synthetic_sorry(e))
return p.env();
type_context tc(p.env(), transparency_mode::All);
auto type = tc.infer(e);