[SR-5172] lazy variable resetting no longer works, but breaking change wasn't documented #47748
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 4.0
Attachment: Download
Environment
Relevant environment:
macOS 10.12.5 (16F73)
Xcode Version 9.0 beta (9M136h)
Apple Swift version 4.0 (swiftlang-900.0.43 clang-900.0.22.8)
Target: x86_64-apple-macosx10.9
Comparison environment:
macOS 10.12.5 (16F73)
Xcode Version 8.3.3 (8E3004b)
Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: e9898aa0b915c8f6d135352f3e2b59b8
Issue Description:
As of Swift 3.2, the behavior described here was possible and reliable. In Swift 4, it results in the value being `nil` forever.
While I agree this change makes the language more consistent and predictable, it wasn't documented anywhere I can find.
Test:
The text was updated successfully, but these errors were encountered: