]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: accept switches on comparable arrays.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Fri, 3 Aug 2012 19:47:26 +0000 (21:47 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Fri, 3 Aug 2012 19:47:26 +0000 (21:47 +0200)
commitf4f1ba2b1ebb76d4277cd775215ccd12994ffb40
tree487bb7df55ec24a0071305933de2d3250a5606a3
parent728f19131919734e473e3de425abb966b45b13f8
cmd/gc: accept switches on comparable arrays.

The compiler is incorrectly rejecting switches on arrays of
comparable types. It also doesn't catch incomparable structs
when typechecking the switch, leading to unreadable errors
during typechecking of the generated code.

Fixes #3894.

R=rsc
CC=gobot, golang-dev, r, remy
https://golang.org/cl/6442074
src/cmd/gc/swt.c
test/switch.go
test/switch3.go