Swift: Runtime crash when iterating an array

Originator:rix.rob
Number:rdar://19757923 Date Originated:07-Feb-2015 03:59 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.1.1 (6A2008a)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
Swift is crashing at runtime when iterating an array, apparently when retaining one of the elements.

cf this commit: https://github.com/antitypical/BinaryTree/commit/95f978aa35405178dc9196000cab6cf06ad5fbb8


Steps to Reproduce:
1. Clone & check out the branch in this PR: https://github.com/antitypical/BinaryTree/pull/2
2. `git submodule update --init --recursive` to get the dependencies
3. Open BinaryTree.xcworkspace
4. Run the unit tests with ⌘U


Expected Results:
I expected the unit tests to succeed.


Actual Results:
They crash, on the `for branch in branches` line.


Regression:
N/A


Notes:
N/A

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!