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 does not go trough ensuring #1408

Closed
mario-bucev opened this issue Apr 27, 2023 · 1 comment · Fixed by #1410
Closed

FragmentChecker does not go trough ensuring #1408

mario-bucev opened this issue Apr 27, 2023 · 1 comment · Fixed by #1410
Assignees

Comments

@mario-bucev
Copy link
Collaborator

mario-bucev commented Apr 27, 2023

In the following snippet, we expect the FragmentChecker to report an error due to using the Scala variant of Option:

object EnsuringMask {
  def test(): Int = {
    val x = scala.Option(2)
    5
  } ensuring (_ == 5)
}

However, it does not, and we instead get a recovery at a later phase:

[ Error  ] test$0 depends on missing dependencies: Option$4, apply$14.
[ Fatal  ] Cannot recover from missing dependencies
[ Error  ] Stainless terminated with an error.
[ Error  ] Debug output is available in the file `stainless-stack-trace.txt`. If the crash is caused by Stainless, you may report your issue on https://github.com/epfl-lara/stainless/issues
[ Error  ] You may use --debug=stack to have the stack trace displayed in the output.

This issue does not affect StaticChecks (for some reasons)

@mario-bucev mario-bucev self-assigned this Apr 27, 2023
@mario-bucev
Copy link
Collaborator Author

Not directly related, but the postcondition is also affected as well:

object EnsuringPostcond {
  def test(): Int = {
    5
  } ensuring (_ == {
    val x = scala.Option(2)
    5
  })
}

This time, StaticChecks is also affected.

mario-bucev added a commit to mario-bucev/stainless that referenced this issue Apr 27, 2023
@mario-bucev mario-bucev linked a pull request May 1, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants