-
Notifications
You must be signed in to change notification settings - Fork 326
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
Expressions not being run if indented by 1 more space than current indentation level #9419
Comments
This is related to #8858 - if that was implemented we would at least see that there is a problem (the indentation there is not a multiple of 4), so we could easier spot the issue. However, while in some cases the non-divisible-by-4 indentation is just a matter of style and it is enough to get a warning, in the case shown in this ticket it seems more severe - as the block is completely ignored. So IMO this particular case should be a hard error.
|
Curiously
fails with
|
So the first case parses the same as this:
The second case parses like this:
|
Radek, haven't you already reported this problem once? |
Wouldn't it be better to just report an error or at least print a warning as #8858 suggests? Especially this case: group_builder.specify "this will run" <|
IO.println "this will be printed"
group_builder.specify "and this test will not even show up on the list!" is pretty dangerous! Indenting 4 spaces on |
I have written in my comment that these 2 issues are related. Maybe one fix can fix both, however I thought that this is another issue as explained in my comment above. |
Jaroslav Tulach reports a new STANDUP for yesterday (2024-05-06): Progress: - merging
|
I've just encountered this in our tests and it was a great confusion for me: e4bebc7
Minimal example:
Actual behaviour
The expression with one more indent level seems to be completely ignored and not evaluated.
Expected behaviour
I guess this should be a syntax error? Definitely we shouldn't just silently swallow an expression and not run it.
The text was updated successfully, but these errors were encountered: