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

FragmentChecker complains when a case class parameter has the same name as inherited members #1351

Closed
mario-bucev opened this issue Dec 7, 2022 · 0 comments · Fixed by #1354

Comments

@mario-bucev
Copy link
Collaborator

Originally discovered by @agilot
In the following:

object FragmentChecker {
  case class Test(eq: Int)
}

The FragmentChecker will reject the snippet with the following error:

[ Error  ] FragmentChecker.scala:2:18: Non-field constructor parameters are not allowed in Stainless.
             case class Test(eq: Int)
                            ^^^^^^^^^

It is due to eq having the same name as the method eq inherited from Any.

mario-bucev added a commit to mario-bucev/stainless that referenced this issue Dec 7, 2022
mario-bucev added a commit to mario-bucev/stainless that referenced this issue Dec 7, 2022
vkuncak pushed a commit that referenced this issue Dec 8, 2022
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 a pull request may close this issue.

1 participant