Skip to content

Statements as expression #322

@giann

Description

@giann

When a block expression has a single statement, the block syntax should be omittable:

final result = from {
    foreach (el in list) {
        if (el.isOk()) {
            out el;
        }
    }
};

becomes

final result = foreach (el in list) {
    if (el.isOk()) {
        out el;
    }
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    languageIssue related to the languageproposalSomething we consider doing

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions