我尝试了这个博客的代码:a-streaming-library-with-a-superpower-fs2-and-functional-programming
在Intellij 中,这段代码:
Stream("bob", "alice", "joe")
.evalMap(name => IO.fromFuture(IO(loadUserIdByName(name)))) // <- here is the exception
.compile
.toList
给了我这个例外:
Expression of type IO[Long] doesn't conform to expected type FS2_[O2_]
运行代码sbt
没有问题。
有没有办法在Intellij中摆脱这个异常?