fix(frontends/lean/pp): fix bug in the pretty printer
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
15c1e39f88
commit
e7c7d5718a
2 changed files with 17 additions and 4 deletions
|
@ -162,10 +162,12 @@ auto pretty_fn::pp_const(expr const & e) -> result {
|
|||
n = *it;
|
||||
} else {
|
||||
for (name const & ns : get_namespaces(m_env)) {
|
||||
name new_n = n.replace_prefix(ns, name());
|
||||
if (new_n != n) {
|
||||
n = new_n;
|
||||
break;
|
||||
if (!ns.is_anonymous()) {
|
||||
name new_n = n.replace_prefix(ns, name());
|
||||
if (new_n != n) {
|
||||
n = new_n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
11
tests/lean/run/crash.lean
Normal file
11
tests/lean/run/crash.lean
Normal file
|
@ -0,0 +1,11 @@
|
|||
import logic
|
||||
|
||||
section
|
||||
hypothesis P : Prop.
|
||||
|
||||
theorem crash
|
||||
:= assume H : P,
|
||||
have H' : ¬ P,
|
||||
from H,
|
||||
_.
|
||||
|
Loading…
Reference in a new issue