Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate named patterns for case classes #22242

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rochala
Copy link
Contributor

@rochala rochala commented Dec 18, 2024

I found out that there is no validation happening for named patterns of case classes.

https://scastie.scala-lang.org/W4p7RBrySwuteISEPuqSUw

There were 2 different things that blocked the errors:

  1. We actually did not run checkWellFormedTupleElems in that scenario,
  2. We run tryAdaptPatternArgs in tryEither which has nested context that does not report errors which are not sticky.

@rochala rochala changed the title Validate case classes named patterns Validate named patterns for case classes Dec 18, 2024
@rochala rochala requested a review from odersky December 19, 2024 09:00
@Gedochao Gedochao requested a review from aherlihy December 19, 2024 09:03
@Gedochao Gedochao linked an issue Dec 19, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants