#imageLiteral autocompletion offered in incorrect contexts

Originator:lowe
Number:rdar://28958206 Date Originated:
Status: Resolved:
Product: Product Version:
Classification: Reproducible:
 
Summary:
Swift #imageLiteral shows up in autocompletion pretty much in all possible and impossible contexts. In a big project with lots of assets this get's really annoying.

Example of locations where images are offered as auto complete suggestions:
* function names
* function parameter name
* function parameter type
* variable name
* global context (i.e. directly in blank file, you don't even need to import UIKit)
* Value for variable assignment and parameters even if variable/param type is not Image.

Steps to Reproduce:
1. Setup project
2. Add image to Assets.xcassets
3. Create new swift file
4. Type asset name in file

Expected Results:
Auto completion suggesting stuff that's actually available in the given scope.

Actual Results:
Autocompletion list includes asset.

Version:
Xcode 8.1, OS X 10.11

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!