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

Forbid empty sequences of imperative statements #1087

Open
anton-trunov opened this issue Jun 17, 2022 · 0 comments
Open

Forbid empty sequences of imperative statements #1087

anton-trunov opened this issue Jun 17, 2022 · 0 comments

Comments

@anton-trunov
Copy link
Contributor

Because when auditing contracts it can sometimes be hard to tell if the contract author just forgot to put a piece of code in some of match-statements and this change would make this explicit.

For example, the following

match is_valid with 
| True => 
| False =>
    error = FooError;
    Throw error
end

would be replaced with

match is_valid with 
| True =>
    do_nothing   (* or `nop` or whatever syntax we choose *)
| False =>
    error = FooError;
    Throw error
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant