We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
scala> case class C(a: Any) defined class C scala> (new C(())) match { | case C => | } <console>:9: error: pattern type is incompatible with expected type; found : object C required: C case C => ^
Suggested type diagnostics:
"Note: you referred to the companion object of the class C. Perhaps you meant '_ : C' or 'C(_)'"
/////////////////////////////////////////
Created from Jason Zaugg comment on https://issues.scala-lang.org/browse/SI-3092?focusedCommentId=48914&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-48914
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-4879?orig=1 Reporter: @soc See #4876
Sorry, something went wrong.
Commit Message Bot (anonymous) said: (extempore in r25458) Better error message for case class/object match confusion. Closes #4879, no review.
No branches or pull requests
Suggested type diagnostics:
"Note: you referred to the companion object of the class C. Perhaps you meant '_ : C' or 'C(_)'"
/////////////////////////////////////////
Created from Jason Zaugg comment on https://issues.scala-lang.org/browse/SI-3092?focusedCommentId=48914&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-48914
The text was updated successfully, but these errors were encountered: