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

fix(forge): Change depth check for expect revert #3820

Closed
wants to merge 2 commits into from

Conversation

brockelmore
Copy link
Member

Motivation

Fix #3437

Solution

I believe there should be no need to ever check <= for expect revert instead of ==, because the only scenario in which it is possible for <= to be occur is for a same depth revert which isn't supported (i.e. we explicitly specify it is based on the next call, and by having <=, it could be such that its actually this call which is in-congruent with the documentation and desired functionality).

This may be a breaking change for some tests, but technically is correct (I believe) and will highlight a broken test.

@brockelmore
Copy link
Member Author

As discussed elsewhere, we are going to continue to support same depth expectRevert+revert patterns, so closing this

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 this pull request may close these issues.

Test function early returns after vm.expectRevert
1 participant