That compiles fine for me too
Win 10 IDE 1.8.5 Arduino Uno
Have you got the correct board and port selected in the IDE