Cannot resolve overloaded method, but code compiles and runs

I am getting some red highlighting syntax for my overloaded methods, but the code still compiles and runs. I've attached my example below. Anyone know why this red highlighting is happen / how i can get rid of it? 

using intellij idea ultimate 2020.1, scala 2.12.8 and jvm-1.8

4

Found this when I had a similar issue. Posting in case it helps someone else.

I fixed this by changing Erro Highlighting from "Built In" to "Compiler". This setting is under Preferences > Languages & Frameworks > Scala

3

This also resolved a similar error I was seeing with overloading the 'withFilter' method.

What exactly does changing it to 'Compiler' do?  Only show/generate errors that come from the compiler rather than IntelliJ?

0

请先登录再写评论。