The Wayback Machine - https://web.archive.org/web/20201027212343/https://github.com/oracle/graal/issues/606
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

Open
fniephaus opened this issue Aug 10, 2018 · 3 comments
Open

Disallow keyword `state` in guards #606

fniephaus opened this issue Aug 10, 2018 · 3 comments

Comments

@fniephaus
Copy link
Contributor

@fniephaus fniephaus commented Aug 10, 2018

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
Contributor Author

@fniephaus fniephaus commented Aug 10, 2018

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
Copy link
Member

@boris-spas boris-spas commented Jan 22, 2020

Tracked internally as Issue GR-20793.

@avirlrma
Copy link

@avirlrma avirlrma commented Mar 19, 2020

Can I work on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.