Commit graph

1 commit

Author SHA1 Message Date
Dmitry Vyukov 8e2423a67d cmd/gc: typecheck type switch variables
Type switch variables was not typechecked.
Previously it lead only to a minor consequence:

switch unsafe.Sizeof = x.(type) {

generated an inconsistent error message.
But capturing by value functionality now requries typechecking of all ONAMEs.

Fixes #9731

Change-Id: If037883cba53d85028fb97b1328696091b3b7ddd
Reviewed-on: https://go-review.googlesource.com/3600
Reviewed-by: Russ Cox <rsc@golang.org>
2015-02-03 15:44:06 +00:00