Xcode shows a different image literal from what is encoded in the source file.

Originator:bwhiteley
Number:rdar://26935610 Date Originated:June 21 2016
Status:DUPLICATE OF 26873899 Resolved:
Product:Xcode Product Version:8 beta 1
Classification:Bug Reproducible:Yes
 
Summary:
You can select an image literal from the autocomplete list, but the image displayed in Xcode is different from the one selected. Also, the image displayed in Xcode is different from the one indicated by the raw text in the source file.

Steps to Reproduce:
Look at the attached screenshots. I selected ProfileImage. Once the autocomplete popover goes away, it shows that I selected ProfileDefault instead. Also, although Xcode shows ProfileDefault, this is the text: 
        self.imageView.image = #imageLiteral(resourceName: "ProfileImage")


Expected Results:
No weirdness.

Actual Results:
Weirdness.

Version:
Xcode 8 beta 1

Notes:
The project has multiple targets and .xcassets files. In the example shown, ProfileImage is present in the same target as the .swift file. ProfileDefault is not part of that target.

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!