Hi,
given the following declarations
@JvmName("bindCollection")
inline fun <reified T> bind(crossinline fn: () -> Collection<T>) {
// ...
}
@JvmName("bindFuture")
inline fun <reified T> bind(crossinline fn: () -> Future<T>) {
// ...
}
// ...
bind { map.values } // <<-- compiler error here
Compiler fails with “Cannot choose among the following candidates without completing type inference”:
However, the following works fine:
@JvmName("bindCollection")
inline fun <reified T> bind(crossinline fn: () -> Collection<T>) {
// ...
}
@JvmName("bind")
inline fun <reified T> bind(crossinline fn: () -> T) {
// ...
}
// ...
bind { map.values } // compiles fine
Is this by design?
thanks and regards
Fuzz