fix(frontends/lean/decl_cmds): missing condition
This commit is contained in:
parent
22f6a95cc4
commit
caf28f4053
1 changed files with 2 additions and 2 deletions
|
@ -172,9 +172,9 @@ optional<binder_info> parse_binder_info(parser & p, variable_kind k) {
|
|||
}
|
||||
|
||||
static void check_variable_kind(parser & p, variable_kind k) {
|
||||
if (in_context(p.env())) {
|
||||
if (in_context(p.env()) || in_section(p.env())) {
|
||||
if (k == variable_kind::Axiom || k == variable_kind::Constant)
|
||||
throw parser_error("invalid declaration, 'constant/axiom' cannot be used in contexts",
|
||||
throw parser_error("invalid declaration, 'constant/axiom' cannot be used in sections/contexts",
|
||||
p.pos());
|
||||
} else if (!in_section(p.env()) && !in_context(p.env()) && k == variable_kind::Parameter) {
|
||||
throw parser_error("invalid declaration, 'parameter/hypothesis/conjecture' "
|
||||
|
|
Loading…
Reference in a new issue