Skip to content

blocks in blocks need to have a semicolon #395

@CohenArthur

Description

@CohenArthur

The following code fails with a parsing error on the 5th line, while it should be valid

if true {
    mut b = 1;
    if true {
        b = 0;
    }

    b
} else {
    15
}

Adding a semicolon at the end of the inner if fixes the parsing but isn't really what we want:

if true {
    mut b = 1;
    if true {
        b = 0;
    };

    b
} else {
    15
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparserParser issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions