Reputation: 163
I defined a variable at my program
import cats.data.{Kleisli, Xor, XorT}
val a = Kleisli[XorT[TwitterFuture, Exception, ?], String, Int] = Kleisli { (s: String) =>
XorT[TwitterFuture, Exception, Int](TwitterFuture(Xor.Right(123)))
}
my build.sbt:
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
addCompilerPlugin("org.spire-math" % "kind-projector" % "0.8.0" cross CrossVersion.binary)
addCompilerPlugin("com.milessabin" % "si2712fix-plugin" % "1.2.0" cross CrossVersion.full)
It's very weird that there was a "type mismatch" error on IntelliJ IDEA.
Type mismatch, expected: (NotInferedA) => NotInferedF[NotInferedB], actual: (String) => XorT[TwitterFuture, Exception, Int]
But I executed sbt compile
successfully, no any errors.
My IntelliJ IDEA version: 2016.2.2
Does someone know what's going on with this situation? How do I fix the problem?
Upvotes: 0
Views: 800
Reputation: 3482
Intellij scala plugin is great, but heavy scala code (types/implicits/macros magic) still is not processed correctly. You can create a ticket in https://youtrack.jetbrains.com/oauth?state=%2Fissues%2FIDEA or vote for existing, and wait for plugin patches.
Also you can patch it yourself: https://github.com/JetBrains/intellij-scala.
Upvotes: 2