mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
In order to avoid issuing diagnostics for compiler-generate code, we ignore the syntax subtree rooted at an implicit node. This causes our algorithm to miss user code wrapped in implicit nodes during desugaring. For example, expressions in implicit returns from single-expression closures and trailing closures are completely ignored right now. This change fixes heproblem by introducing a simple change to the AST walker. Instead of ignoring the entire implicit-node subtree, we only ignore the implicit node but continue to descend into its children. This enables our algorithm to access non-implicit (user code) nodes nested inside implicit (compiler-generated) nodes.