feat(frontends/lean): 'override' command and '#<namespace> <expr>' notation also override aliases

Before this commit they were only overriding notation declarations.
This commit is contained in:
Leonardo de Moura 2015-06-14 15:48:36 -07:00
parent 01f8f3c11d
commit 382d4d32b7
2 changed files with 2 additions and 0 deletions

View file

@ -849,6 +849,7 @@ static environment override_cmd(parser & p) {
ns = *real_ns;
bool persistent = false;
env = override_notation(env, ns, persistent);
env = overwrite_aliases(env, ns, name());
env = update_fingerprint(env, ns.hash());
}
return env;

View file

@ -564,6 +564,7 @@ static expr parse_override_notation(parser & p, unsigned, expr const *, pos_info
name n = p.check_id_next("invalid '#' local notation, identifier expected");
bool persistent = false;
environment env = override_notation(p.env(), n, persistent);
env = overwrite_aliases(env, n, name());
return p.parse_expr_with_env(env);
}