Xcode image autocomplete completes even in situations where it shouldn't

Originator:marcelofabri.mf
Number:rdar://33508145 Date Originated:25-Jul-2017 10:53 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 9 beta 4
Classification:Other Bug Reproducible:Always
 
Summary:
This is a duplicate of radar #33506212

Currently if you have an image in your xcassets that is similar to a keyword in Swift, if you type that keyword, Xcode will offer the completion for the image, which often gets completed when you hit enter, meaning you have to undo the change and type the keyword again.


Steps to Reproduce:
1. Create a new Swift project
2. Add an image to the xcassets called `infoo`
3. Attempt to type out a closure that takes a single argument so it would look like `{ foo in`

Expected Results:
You can type `{ foo in` without any interference (especially when typing `in`)

Actual Results:
Xcode attempts to autocomplete image names, so if you're not careful typing `in` will autocomplete to `infoo`, meaning when you hit enter, you will complete an image, have to undo your changes, and type `in` again this time pressing escape before hitting enter to make sure it doesn't complete for you.

Version:
Xcode 9 beta 4

Notes:
Attached is a project setup to hit this case, open AppDelegate and complete `foo in`. Also attached is a screenshot of the situation you get into.

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!