• TehPers@beehaw.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    16 hours ago

    As in using consts (or variables you think are consts) as refutable patterns? Yeah this was an oversight I’m sure.

    One option is an edition change requiring a const keyword, so

    match foo {
        const BAR => {},
        baz => {},
    }
    

    Right now they use a lint to try to warn the dev though.