-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Forbid case classes without parameter lists? #6969
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
Labels
area:parser
area:reporting
Error reporting including formatting, implicit suggestions, etc
help wanted
itype:bug
Comments
Yes, we should emit the same error as scalac here. |
@smarter can I give this a shot? If so, can you please assign it to me as well. |
BTW, you should make sure that |
@LPTK should this be allowed?
|
@ashwinbhaskar yes, that's just a case value. You refer to it and match it as |
@OlivierBlanvillain can the fix be merged now? |
ashwinbhaskar
added a commit
to ashwinbhaskar/dotty
that referenced
this issue
Aug 7, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:parser
area:reporting
Error reporting including formatting, implicit suggestions, etc
help wanted
itype:bug
Scalac rejects case classes such as:
Dotty currently accepts them. This can be confusing in pattern matching: it looks like pattern
case A =>
is matching on instances of classA
, but it's actually matching on the companion object.The text was updated successfully, but these errors were encountered: