I came across a weird issue with Intellij-scala-plugin 2017.3.11.1 for IntelliJ CE 2017.3
The following code compiles in sbt, but inside Intellij Scala Editor, there is an error highlighted as the attached picture.
trait Schema[+T, K, G] {
def group: G
def toList: List[T]
def export: List[T]
}
trait Visitor[S[+T], +T, K, G] {
def export[B >: T](physicalStore: S[B]): List[B]
def toList[B >: T](physicalStore: S[B]): List[B]
}
case class FlatSchema[S[+T], +T, K, G](group: G, physicalStore: S[T], visitor: Visitor[S, T, K, G]) extends Schema[T, K, G] {
override def toList: List[T] = visitor.toList[T](physicalStore)
override def export: List[T] = visitor.export[T](physicalStore)
}
class ContainerVisitor[S[+T] <: List[Schema[T, K, G]], +T, K, G] extends Visitor[S, T, K, G] {
override def export[B >: T](physicalStore: S[B]): List[B] = physicalStore.flatMap(_.export)
override def toList[B >: T](physicalStore: S[B]): List[B] = physicalStore.flatMap(_.toList)
}
I configured in IntelliJ with Scalac Options as following:
Inside my build.sbt file, I enabled
scalacOptions ++= Seq("-language:higherKinds")
How can I fix my configuration on IntelliJ or it is a issue for IntelliJ Scala Plugin?