Overriding hash in Swift object results in warning in bridging header

Originator:dpassage
Number:rdar://19321126 Date Originated:12/21/2014
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.1.1 and 6.2b3
Classification: Reproducible:Always
 
I have a mixed Swift/Obj-C project in which I'm making a Swift class which subclasses NSObject and implements NSObjectProtocol.

In that class, I'm overriding isEqual and hash for my own purposes. I then want to use that class from Objective-C code.

In the imported "project-Swift.h" header, my hash property gets imported as NSInteger. This conflicts with the definition of hash in the NSObject protocol definition, which is NSUInteger. This creates a warning that I can't get rid of.

Steps to Reproduce:
Open and build the attached project

Expected Results:
Project should build without warnings.

Actual Results:
Project reports a warning in "HashWarning-Swift.h" which I can't get rid of.

Version:
OS Yosemite 10.10.1
Reproduces in both Xcode Version 6.1.1 (6A2006) and Version 6.2 (6C101)

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!