Skip to content

Requirements on difficulty switches having same number of cases is a bit unintuitive #53

Description

@ExpHP

Currently the rule is, "all difficulty switches in a statement must have the same number of cases".

However, a block is a statement. That means that:

{"ENH"}: {
    ins_10(1:2:3:4);
    ins_11(1:2:3);
}

runs afoul of this rule even though it looks like separate statements. But it's unclear how to loosen this rule; consider the following example

if (I0 == (0:1:2:3:4)) {

} else if (I0 == (1:2:3)) {

}

Should this be allowed? I am not so certain!!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions