mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Put in some rudimentary logic for finding circular references within the iterative type checker and diagnosing those cycles. The "rudimentary" part is because we're performing linear searches within a stack rather than keeping a proper dependency graph, which is inefficient and could display longer cycles than are actually present. Additionally, the diagnostic is not specialized to the actual query, so we get a generic "circular reference" diagnostic. OTOH, we show all of the declarations involved in the cycle, which at least lets the user figure out where the cycle occurred. Enable the iterative type checker for resolving the type of a global typealiases. Swift SVN r32572