I have a third-party object that implements both `...
# announcements
r
I have a third-party object that implements both
Iterator
and
Iterable
and I'm trying to call
asSequence
on it -- this results in a compile error:
Copy code
Kotlin: Cannot choose among the following candidates without completing type inference: 
public fun <T> Iterable<Map<String, Any?>!>.asSequence(): Sequence<Map<String, Any?>!> defined in kotlin.collections
public fun <T> Iterator<Map<String, Any?>!>.asSequence(): Sequence<Map<String, Any?>!> defined in kotlin.sequences
I can cast the input to
Iterator<...>
before calling
asSequence
but is there a way to disambiguate this call without a cast?