1
0
mirror of https://github.com/golang/go synced 2024-10-05 12:21:22 -06:00
go/src/cmd/gotype
Robert Griesemer f6d536bea4 go/parser: fix type switch scoping
Introduce extra scope for the variable declared by a
TypeSwitchGuard so that it doesn't conflict with vars
declared by the initial SimpleStmt of a type switch.

This is a replacement for CL 4896053 which caused
a build breakage.

Also:
- explicitly detect type switches (as opposed to detecting
  expression switches and then do extra testing for type switches)
- fix all outstanding TODOs in parser.go
- ran all tests

R=rsc
CC=golang-dev
https://golang.org/cl/4914044
2011-08-23 09:22:41 -07:00
..
testdata go/parser: fix type switch scoping 2011-08-23 09:22:41 -07:00
doc.go go/parser: report illegal label declarations at ':' rather than guessing the start 2011-07-22 09:55:37 -07:00
gotype_test.go go/printer: changed max. number of newlines from 3 to 2 2011-07-14 14:39:40 -07:00
gotype.go go/parser: report illegal label declarations at ':' rather than guessing the start 2011-07-22 09:55:37 -07:00
Makefile testing: set up structure for faster testing using the new -test.short flag. 2011-03-25 14:50:44 -07:00