Skip to content

It's unknown if "fallthrough" can be used for its intended purpose #2674

@CTMacUser

Description

@CTMacUser

Looking at the rules, specifically the (non-)triggering examples for fallthrough, it's not clear if:

switch myInt {
case 2:
    myResult += 1
    fallthrough
case 1:
    myResult += 1
default:
    return 0
}

is a non-triggering case or not. (It shouldn't be. And I need to file a new issue if it is, unless issue #2194 already covered it.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions