Skip to content

Prohibit in-scope consts from use as variable names in binders, like nullary tags #1193

Closed
@boggle

Description

@boggle

The following minimal example fails with "unreachable pattern"

mod foo {
    type t = u8;

    const a = 0u8;
    const b = 1u8;

    fn bar(v: t) -> bool {
        alt v {
            a { ret true; }
            b { ret false; }
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions