Unity still autocompletes a type after it's been deleted

I have a type, ShipPartEditor, that I accidentally deleted while reorganizing some files. When I tried to remake it, autocomplete was broken in that one file. I deleted the file again and decided I’d deal with it later. I noticed after a while that the deleted type – which, when I grepped the source files, was literally never mentioned even once – was still showing up in autocomplete, which is (I assume) why the autocomplete in that file wasn’t working.

How can I get rid of this issue?

First of all Unity can’t autocomplete anything since Untiy doesn’t have a code editor. You probably talk about VisualStudio. So first of all it’s not a problem in Unity but in Visual Studio.

Keep in mind when you don’t switch to Unity and let it recompile the scripts, Visual Studio might still reference the last compiled assemblies.

So make sure you let Unity actually compile all your scripts and let it update the VS project.