We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
3.0.0-RC1
@main def Main23() = { for x <- 0 to 1; x <- 0 to 1; do println(1) for x <- 0 to 1 y <- 0 to 1 do println(2) for x <- 0 to 1 y <- 0 to 1 do println(3) }
Note that compilation error "yield or do expected" is only shown for the 2nd for and not for the 1st and 3rd
for
An error should be reported in all 3 cases or in none
The text was updated successfully, but these errors were encountered:
That's because (1) or (3) don't see an indented region.
Sorry, something went wrong.
Still looks awkward that this code is accepted by the compiler: while the example with indented first enumerator is not.
Taking into account that braceless for-expressions require do/yield keyword maybe it's worth not treating indented region inside enumerators at all?
I refer to this comment chain - where indentation is not checked when the context it appears in is unambiguous: #8659 (review)
No branches or pull requests
Compiler version
3.0.0-RC1
Minimized code
Output
Note that compilation error "yield or do expected" is only shown for the 2nd
for
and not for the 1st and 3rdExpectation
An error should be reported in all 3 cases or in none
The text was updated successfully, but these errors were encountered: