Skip to content

add an error for using var when one could have used const #224

@andrewrk

Description

@andrewrk
fn add(a: i32, b: i32) {
    var x = a + b;
    return x;
}

Should give error: x should be declared const

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThis proposal is planned.breakingImplementing this issue could cause existing code to no longer compile or have different behavior.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions