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

{:only} should also work on single declarations #4074

Closed
MikaelMayer opened this issue May 24, 2023 · 0 comments · Fixed by #4075
Closed

{:only} should also work on single declarations #4074

MikaelMayer opened this issue May 24, 2023 · 0 comments · Fixed by #4075

Comments

@MikaelMayer
Copy link
Member

As discussed as a team, the following should report only 3 errors instead of 6:

method {:only} TestReported() {
  assert false; // An error here
}

method TestNotReported() {
  assert false; //  No error here
}

class A {
  method {:only} TestReported() {
    assert false; // An error here
  }
  
  method TestNotReported() {
    assert false; //  No error here
  }
}

module B {
  method {:only} TestReported() {
    assert false; // An error here
  }
  
  method TestNotReported() {
    assert false; //  No error here
  }
}

That feature will make the use of {:only} on part with selective verification where users can verify only one method at a time, except that it would work for any IDE and also on the command line, without having to specify a specific attribute.

MikaelMayer added a commit that referenced this issue May 24, 2023
MikaelMayer added a commit that referenced this issue Jun 8, 2023
This PR implements a feature that fixes #4074
I added the corresponding tests, auditor entries and documentations with
appropriate links.

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>

---------

Co-authored-by: Aaron Tomb <aarotomb@amazon.com>
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