Type inference doesn't work with IDE
Closed this issue · 4 comments
Normally when I clone an sbt project from GitHub into IntelliJ, type inference works.
I did File > New > Project from Version Control > GitHub
, cloned it, and type inference does not work.
I don't know what you mean by "type inference doesn't work". Does the cloned project compile without error? If there are errors, perhaps the dependencies didn't get brought over successfully.
Pressing "Ctrl-Q" in IntelliJ is supposed to bring up the type but it doesn't. The project compiles and runs with sbt.
I don't really know why that happens. What file?
Watch this video...
Basically normally when you clone a repo into IntelliJ, type inference works. Ctr-Q pulls up the type. Hover over pulls up the type.
What happened was when I imported spark-scala-tutorial into IntelliJ and followed the exact same steps as I did for hello-slick, type inference did not work in any text file. For example, val sc
of type "SparkContext" was being type inferred to "Any".
Unfortunately, when I got around to replicating it, everything worked.