go/parser: fix type switch scoping
The variable declared by a TypeSwitchGuard must be visible in each TypeCaseClause and must not conflict with other variables declared by the initial SimpleStmt of a type switch. Also: - explicitly detect type switches (as opposed to detecting regular (expression switches) and then do extra testing for type switches - fix all outstanding TODOs in parser.go R=rsc CC=golang-dev https://golang.org/cl/4896053
Showing
Please
register
or
sign in
to comment