lean4
lean4 copied to clipboard
Unexpected token `mutual` after docstring comment
Prerequisites
Please put an X between the brackets as you perform the following steps:
- [X] Check that your issue is not already filed: https://github.com/leanprover/lean4/issues
- [X] Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to Mathlib or Batteries.
- [X] Test your test case against the latest nightly release, for example on https://live.lean-lang.org/#project=lean-nightly (You can also use the settings there to switch to “Lean nightly”)
Description
A comment block followed by a mutual block doesn't type check, possibly doesn't parse at all either
Steps to Reproduce
/-- T --/
mutual
inductive T where
end
Expected behavior: Code successfully type checks
Actual behavior: Errors with the following message:
unexpected token 'mutual'; expected '#guard_msgs', 'abbrev', 'add_decl_doc', 'axiom', 'binder_predicate', 'builtin_dsimproc', 'builtin_dsimproc_decl', 'builtin_initialize', 'builtin_simproc', 'builtin_simproc_decl', 'class', 'declare_simp_like_tactic', 'declare_syntax_cat', 'def', 'dsimproc', 'dsimproc_decl', 'elab', 'elab_rules', 'example', 'inductive', 'infix', 'infixl', 'infixr', 'initialize', 'instance', 'macro', 'macro_rules', 'notation', 'opaque', 'postfix', 'prefix', 'simproc', 'simproc_decl', 'structure', 'syntax', 'theorem' or 'unif_hint'
Versions
4.8.0-rc1
, as well as Lean nightly at https://live.lean-lang.org/#project=lean-nightly