Swift: With Arrays, overload append to be similar to +=

Originator:m.mayer6
Number:rdar://17655869 Date Originated:13-Jul-2014 01:38 PM
Status:Closed Resolved:Yes
Product:Developer Tools Product Version:Xcode 6 Beta 3
Classification: Reproducible:Yes
 
Overload the append function so that it can append either an element or an array to an existing variable array.

Allow:
var bArray = [0, 1]
bArray.append([2, 3])
println(bArray)

Output:
[0, 1, 2, 3]

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!