Enum cases imported from Swift to ObjC do not code complete until used once

Originator:jalkut
Number:rdar://26062699 Date Originated:03-May-2016 09:44 AM
Status:Open Resolved:
Product:Developer Tools Product Version:7.3.1
Classification:UI/Usability Reproducible:Always
 
Summary:
Any enumeration cases imported from Swift to Objective C will not code complete unless they've been both used and compiled once in the context of existing Objective C code in the project. This limits the usefulness of code completion for such enumerations, especially since it's not uncommon for enumeration constants to be used only once in specific development workflows. The end result is you have to manually type out each enumeration case constant at least once.

Steps to Reproduce:
1. Open attached ImportedSwiftEnum sample project.
2. Build once to ensure the first imported Swift enum constant, SwiftEnumFirstItem, is recognized by the autocompletion index.
3. Click into the source file SomeObject.m and follow th directions in the comment, attempting to change the case from SwiftEnumFirstItem to SwiftEnumSecondItem.

Expected Results:
Code completion should assist with the change, offering any of the suitable name matches from the imported enum as possible completions.

Actual Results:
Only the enumeration case constants that have been encountered before in the project will be offered as completions.

See screen shot for more clarification and evidence of the completion shortcoming.


Version:
Version 7.3.1 (7D1012)

Notes:


Configuration:
MacBook Pro 2014 edition 15"

Attachments:
'SomeObject_m_—_Edited.png' and 'ImportedSwiftEnum.zip' were successfully uploaded.

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!