ballerina-platform/ballerina-lang

[Bug]: The formatter produces incorrect indentation for a query collect within a function expression body

Opened this issue · 0 comments

Description

$title.

Screen.Recording.2024-08-28.at.1.23.43.PM.mov

Ideally, it should maintain the existing formatted text.

Steps to Reproduce

Execute bal format command for the following source:

function transform2(Item[] items) returns Invoice =>
    from var {symbol, price, volume} in items
        collect {
            totalVolume: sum(volume),
            totalPrice: sum(price),
            symbols: [symbol]
        };

Affected Version(s)

No response

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response