fix(frontends/lean/parser): crash on Win 10

This commit is contained in:
Leonardo de Moura 2016-11-07 21:30:19 -08:00
parent bb5033dc57
commit abd96e748f
2 changed files with 8 additions and 2 deletions

View file

@ -2007,8 +2007,8 @@ expr parser::parse_tactic(unsigned) {
/** \brief Helper class for creating type context only if needed */
class lazy_type_context : public abstract_type_context {
environment const & m_env;
options const & m_opts;
environment m_env;
options m_opts;
std::unique_ptr<type_context> m_ctx;
type_context & ctx() {
if (!m_ctx)

View file

@ -0,0 +1,6 @@
{"command":"sync","file_name":"c:/Users/leonardo/projects/lean/build/debug/tst.lean","content":"def f : nat → nat\n| 0 := 0\n| (n+1) := f n + f n\n\nopen tactic\n\n\n\nmeta def tac : tactic unit :=\ndo x ← target,\n y ← infer_type x >>= whnf,\n trace y,\n return ()\n"}
{"command":"check"}
{"command":"sync","file_name":"c:/Users/leonardo/projects/lean/build/debug/tst.lean","content":"def f : nat → nat\n| 0 := 0\n| (n+1) := f n + f n\n\nopen tactic\n\nset_option trace.compiler\n\nmeta def tac : tactic unit :=\ndo x ← target,\n y ← infer_type x >>= whnf,\n trace y,\n return ()\n"}
{"command":"check"}
{"command":"sync","file_name":"c:/Users/leonardo/projects/lean/build/debug/tst.lean","content":"def f : nat → nat\n| 0 := 0\n| (n+1) := f n + f n\n\nopen tactic\n\nset_option trace.compiler true\n\nmeta def tac : tactic unit :=\ndo x ← target,\n y ← infer_type x >>= whnf,\n trace y,\n return ()\n"}
{"command":"check"}