Saved that code as “Scripts/PlayerController.cs” in a new project. It does not give a compile error, nor does it display a “names do not match” message. Tested with Unity 2017.4.10f1.
I recommend you check if you have other compile errors, in other files, in the project.
Please use code-tags when you post source code, as it makes it easier for everybody to read and help you: