Xcode 7 beta 6 (7A192o): Array range gives EXC_BAD_INSTRUCTION in Xcode 7 beta 6

Originator:bugreportopenradar
Number:rdar://22489263 Date Originated:29-Aug-2015 04:17 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7 beta 6 (7A192o)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
Using the “…” and “..<“ operators to get a slice of an array raises EXC_BAD_INSTRUCTION in Xcode 7 beta 6.

Steps to Reproduce:
1. Put the following code in a new playground or iOS:

var shoppingList = ["Eggs","Milk"]  
shoppingList.append("Flour")  
shoppingList += ["Baking Powder"]  
shoppingList += ["Chocolate Spread", "Cheese", "Butter"]  
shoppingList.count  
shoppingList[4...6] 

Expected Results:
The output of the last statement should be ["Chocolate Spread", "Cheese", "Butter"]

Actual Results:
The output is an error: “Execution was interrupted. Reason: EXC_BAD_INSTRUCTION (code=EXC_i386_INVOP, subcode=0x0).”

Regression:
This worked in Xcode 7 beta 5 and doesn’t work in Xcode 7 beta 6.

Notes:
Please note that this fails the same way when using the “..<“ instead of “…”.

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!