IntelliJ source code editor shows false compilation errors

In file menu, Invalidate Caches / Restart

also set Incremental Type to SBT in Settings -> Build, Execution, Deployment-> Compiler -> Scala Compiler