In Swift, the Array type seems to evaluate === differently when importing Cocoa

Originator:dave
Number:rdar://17192099 Date Originated:06-Jun-2014 00:21 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6 Beta 1
Classification:Other Bug Reproducible:Always
 
Summary:
For example:

In a playground add this code:

import Cocoa
var a = [1, 2, 3]
var b = a
var c = a[0...2]
a === c // true
b === c // true
a === b // false with Cocoa, true without Cocoa

Just commenting out the import Cocoa line will change the a === b line to true. Shouldn't it be true with Cocoa imported as well?


Version:
Xcode 6 Beta 1

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!