]> Cypherpunks repositories - gostls13.git/commit
undo CL 4896053 / c62cf48b7dc4: fix build
authorRobert Griesemer <gri@golang.org>
Thu, 18 Aug 2011 18:42:19 +0000 (11:42 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 18 Aug 2011 18:42:19 +0000 (11:42 -0700)
commit88432625998cf6c05bacc86ef9d29c25e0c608c8
treedeefd04014e12e100e9b7e95cb8d01a6ee6a8214
parent18248ced3643a2cfcb4119bd5120aaa2a49b6cc8
undo CL 4896053 / c62cf48b7dc4: fix build

The subtle AST changes introduced with CL 4896053
broke type checking of type switches in gofix.
Coming up with a correct fix will take some time.
Undoing this change for now.

««« original CL description
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
»»»

R=rsc
CC=golang-dev
https://golang.org/cl/4902052
src/cmd/gotype/testdata/test1.go
src/pkg/go/parser/parser.go
src/pkg/go/parser/parser_test.go