Idea Scala plugin: wrong error highlight for predef: cannot resolve symbol

Hello,

Idea Scala plugin is issuing an error highlight for a predef that seems to be wrong.

I'm using the Scala-graph lib. To reproduce the error:

1 - create a new scala (sbt) project

2- add the following line to the "build.sbt":

    libraryDependencies += "org.scala-graph" %% "graph-core" % "1.12.1"

3- create a new Scala object and paste the following code:

import scalax.collection.Graph 
import scalax.collection.GraphPredef._

object Scala_Graph_Test {
def main(args: Array[String]): Unit = {
val g = Graph(1~2)
val n = g.nodes.head
println(n)
}
}

The predef function "head" appears highlighted as error: "cannot resolve symbol head"

The same happens in a Scala worksheet.

In both cases, the code runs normally and correctly. The Code Completion also shows the "head" function (Alt-space).

I tried to invalidate the cache and restart, but the highlight is still there.

Any suggestions? Is this an error?

Thanks.

0
1 comment

Thank you for the report, this looks like a bug. I've created on issue on our issue tracker: https://youtrack.jetbrains.com/issue/SCL-13208

0

Please sign in to leave a comment.