Skip to content

go/types: allows duplicate switch cases #11578

Closed
@dvyukov

Description

@dvyukov

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions