erg-lang / erg

A statically typed language compatible with Python
http://erg-lang.org
Apache License 2.0
2.69k stars 55 forks source link

Wrong indentation in nested code #279

Closed mtshiba closed 1 year ago

mtshiba commented 1 year ago

Describe the bug?

...

Reproducible code

for! [1, 2], _i =>
    for! [3, 4], _j =>
        if True, do:
            None
    print! "this should be printed only twice"

Expected result

this should be printed only twice
this should be printed only twice

Actual result

this should be printed only twice
this should be printed only twice
this should be printed only twice
this should be printed only twice

Additional context

No response

Erg version

0.6.0-beta.1

Python version

No response

OS

None