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

checkInvariants for both pre and post conditions #36

Open
ethers opened this issue Jul 28, 2016 · 1 comment
Open

checkInvariants for both pre and post conditions #36

ethers opened this issue Jul 28, 2016 · 1 comment

Comments

@ethers
Copy link
Contributor

ethers commented Jul 28, 2016

How about a modifier like this ?

modifier checkInvariants() {
        if (fundBalance != this.balance) {
            throw;
        }
       _
        if (fundBalance != this.balance) {
            throw;
        }
    }
@ethers
Copy link
Contributor Author

ethers commented Jul 28, 2016

hmm this won't work for functions with return :( until ethereum/solidity#686 is fixed

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

No branches or pull requests

1 participant