Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find implicit conversions

I'm searching a way to find implicit conversion. Something which give me the packages where a conversion from one to the other type is.

As an example:

found   : java.lang.String("")
required: net.liftweb.http.js.JsExp

After some searching in the Scaladoc i found the package with the implicit conversion. Isn't there some automated way to do this search?

Edit: I'm not so good at formulating. My problem is to find out which package i have to import. The IDE already displays when an implicit conversion is used. But sometimes i believe that somewhere a implicit conversion should exist but have no clue in which package.

like image 440
Fabian Avatar asked Mar 07 '11 15:03

Fabian


1 Answers

The NetBeans plugin for Scala projects will allow you Ctrl-hover over a value to see any implicit conversions that have been applied. You can also use some of the compiler debugging options when attempting to compile your code; I think here -Xlog-implicits might be what you're looking for. More useful compiler flags can be found here: http://www.paulbutcher.com/2010/04/scala-compiler-advanced-options/

like image 185
Kris Nuttycombe Avatar answered Sep 24 '22 21:09

Kris Nuttycombe