Skip to content

go/types: allows duplicate switch cases #11578

Closed
@dvyukov

Description

go/types accepts the following program:

package a
func f() {
    switch 0 {
        case 0:
        case 0:
    }
}

While both gc and gccgo reject it with duplicate case 0 in switch.
Compilers should agree on validity of this program.

on commit 997b354

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions