[SR-9524] Optional flatMap produces differing results between debug and release build in special scenario. #51975
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
optimized only
Flag: An issue whose reproduction requires optimized compilation
Attachment: Download
Environment
Xcode Version 10.1 (10B61)
Swift 4.2
iPhone 8 Simulator (12.1)
OSX 10.13.6 (17G3025)
Additional Detail from JIRA
md5: ef7b19558e2ff6cabbb02a9c8210debe
Issue Description:
I've attached a demo project to illustrate the behaviour.
This is what is happening. Consider the following code:
The test variable seems to be nil in debug builds and non-nil in release builds.
The text was updated successfully, but these errors were encountered: