• Robert Griesemer's avatar
    go/types: fix scope printing (debugging support) · 8e2333b2
    Robert Griesemer authored
    Printing of scopes was horribly wrong: If a scope contained
    no object declarations, it would abort printing even if the
    scope had children scopes. Also, the line breaks were not
    inserted consistently. The actual test case (ExampleScope)
    was incorrect as well.
    
    Fixed and simplified printing, and adjusted example which
    tests the printing output.
    
    Change-Id: If21c1d4ad71b15a517d4a54da16de5e6228eb4b5
    Reviewed-on: https://go-review.googlesource.com/135115
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarAlan Donovan <adonovan@google.com>
    8e2333b2
scope.go 5.63 KB