Skip to content

Check variable initialization #254

@tiif

Description

@tiif

In today's formality, we never check if a variable is initialized before use, so the test below passed although it shouldn't.

crate Foo {
    fn foo () -> u32 = minirust() -> x {
        let x: u32;
        exists {
            bb0: {
                statements {
                }
                return;
            }
        }
    };
}

The test above is equivalent to

fn foo() -> u32{
    let x: u32;
    return x;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions