Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA 13 gives invalid error about incompatible types (Java-Scala-InterOp in Play)

I just upgraded from IDEA 12 to 13 (community edition) and since then I get an error in IDEA about incompatible types for my play project.

Option<String> authHeaderOption = requestHeader.headers().get(AUTHORIZATION);

requestHeader is of type play.api.mvc.RequestHeader. The error message states:

Incompatible types. Found: 'scala.Option<java.lang.String>', required: 'scala.Option<java.lang.String>

So it complains about types being incompatible but at the same moment states that required and found types are the same.

When running the app from play console everything works fine, so compilation works.

The error occurs in a java class that calls the scala play api. Before upgrading IntelliJ there was no such error so it must be an IDE issue but I have not been able to figure out what yet.

Has anyone seen this kind of error before?

like image 523
Candlejack Avatar asked Feb 19 '14 11:02

Candlejack


1 Answers

Hit the "File -> Invalidate Caches / Restart..." menu item.

like image 160
okutane Avatar answered Sep 20 '22 06:09

okutane