Skip to content

Correctly handle indent for if/when conditions with line comments before them #692

Description

@AbdullinAM

Currently, line comments break the indent for all expressions with conditions (i.e. everything that uses emitKeywordWithCondition). Line breaks force a new line, however because no actual GJF breakOp` was called, it is not aware of the break and does not add necessary indents:

if (//foo
x) {
   bar()
}

when (//foo
x) {
   1 if //foo
   baz() -> TODO()
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions