Let's say I have a type called LongArrayWritable, that is a boxed representation of an Array of Longs. I have implicit definitions that convert between these types:
implicit def boxLongArray(array: Array[Long]) : LongArrayWritable { /*elided*/}
implicit def unboxLongArray(array: LongArrayWritable) : Array[Long] { /*elided*/}
Now, I also have implicits that convert between java.lang.Iterable and scala.collection.List[X] in their generic form:
implicit def iterator2list[X](it : java.lang.Iterable[X]) : List[X] { /* elided */ }
implicit def list2iterator[X](list : List[X]) : java.lang.Iterable[X] { /* elided */ }
With these definitions, can the scala compiler infer an implicit conversion between java.lang.Iterable[LongArrayWritable] and List[Array[Long]] (the equivalent of iterator2list(iterator).map(unboxLongArray(_))
), or is this beyond the capabilities of implicits, and therefore requires it's own (explicit?) implicit definition?
Thanks,
Tim