aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2020-09-29 02:11:10 -0700
committerMatthew Dempsky <mdempsky@google.com>2020-09-29 22:49:58 +0000
commit0e85fd7561de869add933801c531bf25dee9561c (patch)
treeed31088cd83df0c80c556d19fb2967cde0bb351b /src/runtime
parentaf9c5e5dbc3a5abc49aa3ac45da1b533b0d238a6 (diff)
downloadgo-0e85fd7561de869add933801c531bf25dee9561c.tar.xz
cmd/compile: report type loop for invalid recursive types
Similar to how we report initialization loops in initorder.go and type alias loops in typecheck.go, this CL updates align.go to warn about invalid recursive types. The code is based on the loop code from initorder.go, with minimal changes to adapt from detecting variable/function initialization loops to detecting type declaration loops. Thanks to Cuong Manh Le for investigating this, helping come up with test cases, and exploring solutions. Fixes #41575 Updates #41669. Change-Id: Idb2cb8c5e1d645e62900e178fcb50af33e1700a1 Reviewed-on: https://go-review.googlesource.com/c/go/+/258177 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Trust: Matthew Dempsky <mdempsky@google.com> Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/runtime')
0 files changed, 0 insertions, 0 deletions