462c182ce7
The existing cycle detection scheme passes around a (type name) path; when a type name re-appears in the path, a cycle is reported. Indirections (as in *T, func(T), etc.) are broken by starting a new (nil) path. The problem with this approach is that it doesn't work for cycles involving alias type names since they may be invalid even if there is an indirection. Furthermore, the path must be passed around through all functions which is currently not the case, which leads to less optimial error reporting. The new code is using the previously introduced color marking scheme and global object path for package-level cycle detection (function-local cycle detection doesn't use the same code path yet but is also much less important as cycles can only be created using the type being declared). The new code is guarded with an internal flag (useCycleMarking) so it can be disabled in short notice if this change introduced unexpected new issues. Fixes #23139. Fixes #25141. For #18640. For #24939. Change-Id: I1bbf2d2d61a375cf5885b2de1df0a9819d63e5fa Reviewed-on: https://go-review.googlesource.com/115455 Reviewed-by: Alan Donovan <adonovan@google.com> |
||
---|---|---|
.github | ||
api | ||
doc | ||
lib/time | ||
misc | ||
src | ||
test | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
favicon.ico | ||
LICENSE | ||
PATENTS | ||
README.md | ||
robots.txt |
The Go Programming Language
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Download and Install
Binary Distributions
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
Install From Source
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Contributing
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.