That's a bug that we see with Eclipse.
In that case, you can first make sure that your code auto builds. Then, use Ctrl+S, after making changes. It will recompile the code.
Now you can run the code.
If that does not help,
Open problems view from window -> show view -> problems, if there's an error, fix it
eclipse will reject to compile if there are any problems in your project