mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When an accessor macro adds a non-observing accessor to a property, it subsumes the initializer. We had previously modeled this as removing the initializer, but doing so means that the initializer could not be used for type inference and was lost in the AST. Explicitly mark the initializer as "subsumed" here, and be more careful when querying the initializer to distinguish between "the initializer that was written" and "the initializer that will execute" in more places. This distinction already existed at the pattern-binding level, but not at the variable-declaration level. This is the proper fix for the circular reference issue described in rdar://108565923 (test case in the prior commit).
25 KiB
25 KiB