intellij show error but build project is success with gradle in scala project

I am studying the source code of Kafka at branch 0.10.2。

I have installed scala plugin in Intellij of version 2018.2.11.

When I read code of scala kafka.tools.DumpLogSegments at line 337 like follow 

It shows error to me.

But when I use `Build Project`,it tells me success。

I have tried `Invalidate cache`, delete `~/.idea` directory and reimport, delete intellij cache directory of OSX. But they do not work for me.

The follow code sample also has similar problem

  trait a[A, B] {
def b(): (Option[A], Option[B])
}

def august(test: a[_, _]): Unit = {
val (ra, rb) = test.b()
ra.foreach(ra => print("success"))
}

 

I guess, this may be  scala plugin's bug, but I can not make sure of this. 

Please HELP ME! THANKS!

Please sign in to leave a comment.