Using && Operator with Explicitly unwrapped Optional causes a Swift frontend crash (Segmentation Fault)
| Originator: | florian.p37 | ||
| Number: | rdar://17216471 | Date Originated: | 07-Jun-2014 |
| Status: | Open | Resolved: | |
| Product: | Swift | Product Version: | swift-600.0.34.4.5 |
| Classification: | Reproducible: | Always |
Steps to Reproduce:
Using Swift with the following code:
var explicitOptional: Any!
var anotherExplicitOptional: Any!
if explicitOptional && anotherExplicitOptional {
// segfault
}
Expected Results:
The expected result should be an evaluation of the expression explicitOptional && anotherExplicitOptional returning true if both of the variables have values or false if any is empty.
Actual Results:
The actual result is a segmentation fault when compiling (a crash of Xcode when using playground) due to a segmentation fault, here's the error I'm getting:
1. While emitting IR SIL function @top_level_code<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation)
(The complete stack trace is attached to this report)
Version:
Xcode 6.0 6A215l Swift 1.0 (swift-600.0.34.4.5)
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!