]> Cypherpunks repositories - gostls13.git/commit
gc: Better typechecks and errors in switches.
authorLuuk van Dijk <lvd@golang.org>
Wed, 9 Nov 2011 09:58:53 +0000 (10:58 +0100)
committerLuuk van Dijk <lvd@golang.org>
Wed, 9 Nov 2011 09:58:53 +0000 (10:58 +0100)
commit13e92e4d7542ac65a7efb33778f752403c5ac014
treeed9d3ba14020b4522d06ee75b2cf5892d06507e5
parent820523d09186bd9c7078338803e41c8592158110
gc: Better typechecks and errors in switches.

Allow any type in switch on interface value.
Statically check typeswitch early.

Fixes #2423.
Fixes #2424.

R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/5339045
src/cmd/gc/swt.c
test/fixedbugs/bug270.go [deleted file]
test/fixedbugs/bug340.go
test/fixedbugs/bug375.go [new file with mode: 0644]
test/switch3.go [new file with mode: 0644]
test/typeswitch3.go [new file with mode: 0644]