]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1] cmd/gc: accept switches on comparable arrays.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Fri, 21 Sep 2012 19:54:26 +0000 (05:54 +1000)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Fri, 21 Sep 2012 19:54:26 +0000 (05:54 +1000)
commitab91d4fe2a2bf8a2e79f42da2c26b661960a7f27
tree0129482010e243dc754df92e08bd1c1cbae73938
parent35b989ed7bb373d107e63f0dc71d4115966b84aa
[release-branch.go1] cmd/gc: accept switches on comparable arrays.

««« backport d68605d10a6b
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