Hi! Explicit type parameters <KEEP> is available f...
# language-proposals
m
Hi! Explicit type parameters KEEP is available for discussion. TL;DR: explicit function type parameters require explicit arguments provided on each call site:
Copy code
inline fun <explicit reified T> List<*>.castAll(): List<T>

val list: List<CharSequence> = listOf("a", "b", "c")
val ok = list.castAll<String>() // ok
val error: List<String> = list.castAll() // error: type argument required
👍 3
👍🏾 1