tact-lang / tact

Tact compiler main repository
https://tact-lang.org
MIT License
395 stars 111 forks source link

Empty statement blocks have extraneous empty line #1039

Open verytactical opened 1 week ago

verytactical commented 1 week ago

Are you using the latest released (or pre-released, a.k.a. "next") version?

Tact source code

init() {

}

Relevant Tact/build system log output

No response

What happened?

Pretty-printer keeps it as

init() {

}

What did you expect?

This doesn't look like expected behavior, because it's almost never formatted this way, and also requires explicit support for displaying empty statement blocks.

Unfortunately it's also persisted in our tests, and fixing it will break indentation in projects that already depend on pretty-printer's output.

Steps to reproduce

No response

How do you run Tact?

No response

Anything else?

No response