[SR-10123] Spurious warning about mutable struct #52525
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
Environment
Xcode 10.2 beta 4
macOS Mojave 10.14.4 beta (18E215a)
Additional Detail from JIRA
md5: aaad3849d944e1270ced5841c1eaea8d
is duplicated by:
Issue Description:
Given the code below, the compiler generates a spurious warning as shown. It's important that the two fragments be in separate files.
Of course, if you follow the compiler's advice and change item to be a let constant, it's no longer possible to access the lazy variable item.value and the compiler produces a hard error.
The text was updated successfully, but these errors were encountered: