[SR-11066] False positive "never mutated" warning when property with mutating getter is accessed on value #53458
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
good first issue
Good for newcomers
Additional Detail from JIRA
md5: d4eed7ca9a1123a2444c66129d325ed0
duplicates:
Issue Description:
https://twitter.com/iljawascoding/status/1146402744070221824
In the second picture, the user has a `var` of struct type on which they're accessing a `lazy` property. The compiler incorrectly warns that the `var` is never mutated, even though reading the lazy property has a mutating getter, so reading it does require mutating the variable.
The text was updated successfully, but these errors were encountered: