• Robert Griesemer's avatar
    gofmt: avoid endless loops · a5ca6352
    Robert Griesemer authored
    With the (partial) resolution of identifiers done
    by the go/parser, ast.Objects point may introduce
    cycles in the AST. Don't follow *ast.Objects, and
    replace them with nil instead (they are likely
    incorrect after a rewrite anyway).
    
    - minor manual cleanups after reflect change automatic rewrite
    - includes fix by rsc related to reflect change
    
    Fixes #1667.
    
    R=rsc
    CC=golang-dev
    https://golang.org/cl/4387044
    a5ca6352
rewrite.go 6.93 KB