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

Errors in for statements #46

Closed
fvictorio opened this issue Sep 29, 2018 · 1 comment · Fixed by #47
Closed

Errors in for statements #46

fvictorio opened this issue Sep 29, 2018 · 1 comment · Fixed by #47
Assignees
Labels
bug Something isn't working
Milestone

Comments

@fvictorio
Copy link
Member

A for statement like this:

for (uint256 i = 0; i < 10; i++) {}

is formatted as:

  for (uint256 i = 0;i < 10; i++;) {

  }}

Things to notice:

  1. The closing brace is duplicated and an extra semicolon is added after the loop condition. Both of these things cause syntax errors.
  2. There is no space after the first semicolon.

I think this is a blocker (hopefully the last one) for publishing an alpha version.

@fvictorio fvictorio changed the title Error in for statements Errors in for statements Sep 29, 2018
@j-f1 j-f1 added the bug Something isn't working label Sep 29, 2018
@mattiaerre
Copy link
Member

Thanks for this @fvictorio I was looking into the issue and I have a branch w/ a kind of a fix. The problem is in the ForStatement as well as the ExpressionStatement; I'll open a PR w/ a new contract (that has got a for loop) so that you can verify what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants