Skip to content

Conversation

@david-christiansen
Copy link
Contributor

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.

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.
@david-christiansen david-christiansen added the changelog-no Do not include this PR in the release changelog label Sep 29, 2025
@david-christiansen david-christiansen added this pull request to the merge queue Sep 29, 2025
Merged via the queue into leanprover:master with commit 4338a8b Sep 29, 2025
19 checks passed
@david-christiansen david-christiansen deleted the no-def-docstring-fix branch September 29, 2025 07:44
arthur-adjedj pushed a commit to arthur-adjedj/lean4 that referenced this pull request Oct 6, 2025
…eanprover#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-no Do not include this PR in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant