Is the following being done?
new com.google.common.base.Function[_,_] {
If this does not work, you can save the declaration as it is now, and then add : com.google.common.base.Function[_, _] after it, for example:
val cache = new MapMaker().softValues().expiration(30, TimeUnit.DAYS).makeComputingMap( new com.google.common.base.Function[String,Int] { def apply(key:String):Int ={ 1 } }: com.google.common.base.Function[_, _])
I heard that some of Google's stuff uses raw types that are pretty hard to integrate with Scala. And, in fact, you should drive back to hell, where they came from, but it's just IMHO.
Also, if you can compile this with -explaintypes , we can get a better idea of ββwhat fails.
Daniel C. Sobral
source share