fix(frontends/lean/parser): crash on Win 10
This commit is contained in:
parent
bb5033dc57
commit
abd96e748f
2 changed files with 8 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
6
tests/lean/server/crash1.input
Normal file
6
tests/lean/server/crash1.input
Normal 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"}
|
||||
Loading…
Add table
Reference in a new issue