thanks <@U0NT624JZ>, more info in our current use ...
# kodein
r
thanks @rocketraman, more info in our current use case syntax aside in case it can be supported in the future
Copy code
interface Empty<A> {
  fun empty(): A
}
val emptyStringProvider: Empty<String> = object : Empty<String> {
  override fun empty(): String = ""
}

fun <A> empty(/* injected */ ev: Empty<A>): A = ev.empty()

empty<String>() //compiles because a provider for `Empty<String>` is found
empty<Int>() //does not compile because no evidence is provided for `Empty<Int>`