• Robert Griesemer's avatar
    go/parser: fix type switch scoping · f6d536be
    Robert Griesemer authored
    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
    f6d536be
Name
Last commit
Last update
..
test1.go Loading commit data...