Skip to content

Conversation

@nomeata
Copy link
Collaborator

@nomeata nomeata commented Oct 15, 2025

This PR ensures that error messages such as “redundant alternative” have
the right error location even if the arms share their RHS. Fixes #10781.

This is a variant of #10783 that changes the syntax to introduce an explicit matchAltPats syntax node.

This PR ensures that error messages such as “redundant alternative” have
the right error location even if the arms share their RHS. Fixes #10781.
@nomeata
Copy link
Collaborator Author

nomeata commented Oct 15, 2025

This doesn’t work yet. Among other things, the expansion of intro pat into intro x; match x with | pat => ?_ doesn’t pick up the new syntax yet.

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Oct 15, 2025
@leanprover-bot
Copy link
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2025-10-13 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2025-10-15 11:08:43)

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Oct 15, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Oct 15, 2025
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

@nomeata nomeata closed this Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

redundant alternative error has wrong location when patterns share their RHS

4 participants