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

@nonreentrant should not compile on constant functions #1544

Closed
haydenadams opened this issue Jul 23, 2019 · 3 comments · Fixed by #1550
Closed

@nonreentrant should not compile on constant functions #1544

haydenadams opened this issue Jul 23, 2019 · 3 comments · Fixed by #1550
Labels
bug Bug that shouldn't change language semantics when fixed.

Comments

@haydenadams
Copy link

Right now this compiles:

@public
@constant
@nonreentrant('lock')
def tokenAddress() -> address:
    return self.token

however reentrancy should never be a problem in constant functions

@jacqueswww
Copy link
Contributor

jacqueswww commented Jul 24, 2019

Agreed, this should be a compiler error.

@jacqueswww jacqueswww added the bug Bug that shouldn't change language semantics when fixed. label Jul 24, 2019
@davesque
Copy link
Contributor

I'm currently looking into this. Will try to have a PR in next day or so.

@davesque
Copy link
Contributor

Actually, this is a pretty easy fix. PR incoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that shouldn't change language semantics when fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants