I would like to add a few words about the warnings and errors that IntelliJ IDEa reports.
JetBrains uses its own scala analyzer to identify and report errors. Sometimes it reports false errors or warnings. I think this is due to the fact that scala is a much more complex language from compilers, and then many other languages. Even if the entire official scala specification was implemented, there are some cases that were omitted (read: there are always some errors). If you find that IntelliJ IDEa has an error / warning message that is suitable for the scalac compiler, you can always try to report it as an error (IntelliJ IDEa supports reporting errors). The guys at JetBrains will fix this.
More than some scala libraries use macros, which are compiler extensions, which adds some additional compiler behavior. If the IDE knows its specification, they will not identify these non-standard codes as errors. It is better to know about it. I think the same goes for the Eclipse scala IDE.
To summarize the above: Donβt trust all the warnings and errors that IntelliJ or another IDE tells you if they are not compiled using scalac.
source share