• Robert Griesemer's avatar
    cmd/compile: reintroduce work-around for cyclic alias declarations · e6305380
    Robert Griesemer authored
    This change re-introduces (temporarily) a work-around for recursive
    alias type declarations, originally in https://golang.org/cl/35831/
    (intended as fix for #18640). The work-around was removed later
    for a more comprehensive cycle detection check. That check
    contained a subtle error which made the code appear to work,
    while in fact creating incorrect types internally. See #25838
    for details.
    
    By re-introducing the original work-around, we eliminate problems
    with many simple recursive type declarations involving aliases;
    specifically cases such as #27232 and #27267. However, the more
    general problem remains.
    
    This CL also fixes the subtle error (incorrect variable use when
    analyzing a type cycle) mentioned above and now issues a fatal
    error with a reference to the relevant issue (rather than crashing
    later during the compilation). While not great, this is better
    than the current status. The long-term solution will need to
    address these cycles (see #25838).
    
    As a consequence, several old test cases are not accepted anymore
    by the compiler since they happened to work accidentally only.
    This CL disables parts or all code of those test cases. The issues
    are: #18640, #23823, and #24939.
    
    One of the new test cases (fixedbugs/issue27232.go) exposed a
    go/types issue. The test case is excluded from the go/types test
    suite and an issue was filed (#28576).
    
    Updates #18640.
    Updates #23823.
    Updates #24939.
    Updates #25838.
    Updates #28576.
    
    Fixes #27232.
    Fixes #27267.
    
    Change-Id: I6c2d10da98bfc6f4f445c755fcaab17fc7b214c5
    Reviewed-on: https://go-review.googlesource.com/c/147286Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    e6305380
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
buildid Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
test2json Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...