[Swift 2.1 documentation] precondition and preconditionFailure still refer to -Ounchecked
Originator: | info | ||
Number: | rdar://23642009 | Date Originated: | 21-Nov-2015 10:21 AM |
Status: | Open | Resolved: | |
Product: | Documentation | Product Version: | Swift 2.1 |
Classification: | Serious Bug | Reproducible: | Always |
Summary: - The documentation for `precondition` and `preconditionFailure` still refers to -Ounchecked, but this optimization level no longer exists in Swift 2.x. Steps to Reproduce: - Open the documentation for these functions: https://developer.apple.com/library/watchos/documentation/Swift/Reference/Swift_StandardLibrary_Functions/index.html#//apple_ref/swift/func/s:FSs12preconditionFTKT_SbKT_SS4fileVSs12StaticString4lineSu_T_. Expected Results: - The documentation for `precondition` correctly explains the behavior for the different optimization levels. Actual Results: - It currently reads: In -Ounchecked builds, condition is not evaluated, but the optimizer may assume that it would evaluate to true. Failure to satisfy that assumption in -Ounchecked builds is a serious programming error. Regression: - This has been incorrect since the initial Swift 2.0 release.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!