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

Disallow keyword state in guards #606

Closed
fniephaus opened this issue Aug 10, 2018 · 7 comments
Closed

Disallow keyword state in guards #606

fniephaus opened this issue Aug 10, 2018 · 7 comments
Assignees
Labels
feature good first issue tracking This issue has an analogue in an internal issue tracker truffle

Comments

@fniephaus
Copy link
Member

Since state is a reserved keyword in Truffle's guard mechanism, it should not be possible to use it in a guard definition as this can cause serious problems. The annotation processor should either reject the state keyword in guard definitions or the state temporary variable produced by the processor should be renamed to avoid this conflict.

Here's an example:
screen shot 2018-08-10 at 3 19 14 pm

@fniephaus
Copy link
Member Author

Oh, forgot to mention that the class also has a state field which is shadowed by the int state value which is also bad.

Since one can get access to the Truffle state this way, I wonder if there are people actually doing this. I can't think of any good reason though, maybe because there isn't :)

@boris-spas boris-spas added feature truffle good first issue tracking This issue has an analogue in an internal issue tracker labels Jan 16, 2020
@boris-spas
Copy link
Member

Tracked internally as Issue GR-20793.

@avirlrma
Copy link

Can I work on this?

@chrisseaton
Copy link
Contributor

@avirlrma are you still interested in fixing this?

@rhyadav
Copy link

rhyadav commented Aug 27, 2021

@chrisseaton i can start working on this

@rhyadav
Copy link

rhyadav commented Oct 8, 2021

@fniephaus i'll start working on this

@rhyadav
Copy link

rhyadav commented Oct 8, 2021

@fniephaus thanks, started work on this

@chumer chumer closed this as completed Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature good first issue tracking This issue has an analogue in an internal issue tracker truffle
Projects
None yet
Development

No branches or pull requests

7 participants
@chrisseaton @fniephaus @boris-spas @chumer @rhyadav @avirlrma and others