lean4-htt/tests/lean/versoDocMissing.lean
David Thrane Christiansen 4338a8be32
fix: better error message on missing declaration name for docstring (#10608)
This PR fixes a bad error message due to elaborating partial syntax with
Verso docstrings.

When elaborating partial syntax, the elaborator sometimes attempts to
add a docstring for a declaration that it didn't parse a name for. The
name defaults to anonymous, but inserting the docs for the anonymous
name throws a panic about being on the wrong async branch.

With this change, the reported error is the expected parser error
instead, which is much friendlier.
2025-09-29 06:26:08 +00:00

9 lines
228 B
Text

set_option doc.verso true
/-!
This test checks that the error produced for a docstring without a corresponding declaration is a parser error instead of an internal error or panic from elaborating partial syntax.
-/
/--
foo
-/