Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

missing indent for multi-line global statement #86

@talcynon

Description

@talcynon

At a global level, writing const x = followed by a new line does not add indentation. (== doesn't affect the code.) Indentation is added correctly when the code is in a function.

Expected:

// Should indent...
const a =
    123;

pub fn main() u8 {
    // Indents as expected.
    const b =
        0;
    return b;
}

Actual:

// Should indent...
const a =
123;

pub fn main() u8 {
    // Indents as expected.
    const b =
        0;
    return b;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions