We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
found in #18498
let temp = ( if true: 1 else: # <------ unindented discard nil 2 )
compiles
CT error because of indentation
1.5.1 12da32a
The text was updated successfully, but these errors were encountered:
nimpretty
That is specific to if and when expressions and intentional.
if
when
let temp = if true: 1 else: # <------ unindented discard nil 2
Sorry, something went wrong.
this doesn't make sense. there is no valid practical purpose to allow code like this:
when true: ( if true: echo 1 elif true: echo 2 else: echo 3 )
and as you can see here, it breaks consistency, eg if you replace echo(2) by if true: echo(2) it stops working:
echo(2)
if true: echo(2)
when true: ( if true: echo 1 elif true: # echo(2) # works if true: echo(2) # fails )
instead of closing immediately, let others chime in at least for a few days
parenthesized should allow useful things like #8258, but not random code like above
No branches or pull requests
found in #18498
Example
Current Output
compiles
Expected Output
CT error because of indentation
Additional Information
1.5.1 12da32a
The text was updated successfully, but these errors were encountered: