You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems reasonable that we would have a similar RelCont relation for the lazy variable initializer. That's consistent with what clang indexing does for references in initial values. We would need to decide whether it is contained by the property itself or the getter accessor of the property.
Sorry for my confusing use terminology, I'm still rather new to the index store.
For my use case I don't think it matters much if it's contained by the property or the getter. Though perhaps the getter is better for consistency sake since that's the behavior of non-lazy computed values.
Environment
Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
Target: x86_64-apple-darwin19.6.0
Additional Detail from JIRA
md5: a8a7140ca0e0c279aee02176eeb9c4a6
Issue Description:
Given the following code:
The index store incorrectly relates the `someVar` reference within the lazy var body with `MyClass` as opposed to `someLazyVar`.
The dependency graph is as follows:
Note the `someVar` reference is a direct child of `MyClass` rather than `someLazyVar`.
This issue appears to be specific to lazy variables, when `someLazyVar` is changed to be non-lazy, the `someVar` reference is correctly related.
The text was updated successfully, but these errors were encountered: