Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: spurious "duplicate case in switch" error #24159
This code is spec compliant:
go/types and gccgo accept it, but cmd/compile erroneously rejects it with:
The issue is swt.go:632 is using typeVal to look for value collisions. However, it's using the string representation of types to look for type identity, but this isn't sound as the example above demonstrates.