Xcode-beta (8S188o): Objective-C class references in Swift get __ObjC. prepended incorrectly

Originator:thedov
Number:rdar://27700963 Date Originated:04-Aug-2016 12:19 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode-beta (8S188o)
Classification:Other Bug Reproducible:I Didn't Try
 
Summary:
A custom class of mine, named “Box” was referred to in Swift by just that name. The Swift 3 migrator changed all references to “__ObjC.Box”, which then didn’t compile with the message “Use of undeclared type ‘__ObjC.Box’”

Steps to Reproduce:
1. In Xcode 7 create a project with a Core Data class named “Box” defined in Objective-C
2. Add a Swift file that uses that class, adding it to the bridging header
3. In Xcode 8, migrate the project to Swift 3

Expected Results:
Either (a) the references Swift become “__ObjC.Box” and the code compiles, or (b) the references stay “Box”

Actual Results:
The Swift references to “Box” become “__ObjC.Box” and The compiler returns an error: “Use of undeclared type ‘__ObjC.Box’”

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!