Unable to do refactoring on my Swift file in Xcode 9

CodeChanger picture CodeChanger · Sep 27, 2017 · Viewed 7.2k times · Source

I am using Xcode 9 and I am trying to do Refactoring on my Swift based file but every time I am getting below error:

Refactoring engine ranges didn't match initial ranges

enter image description here

Why isn't it matching the initial range?

Answer

Cannoliopsida picture Cannoliopsida · Jan 6, 2018

Workaround: Restart Xcode.

This has not been resolved yet as of January 2018 (Xcode 9.2).