Is there a way with reified generics to handle `T:...
# announcements
s
Is there a way with reified generics to handle
T: Any?
differently from
T: Any
without conflicting overloads? The following conflict:
Copy code
inline fun <reified T: Any> foo(): Bar<T> {}
inline fun <reified T: Any, S: T?> foo(): Bar<S> {}
Which makes sense since it’s ambiguous for the call when T is non-null.
l
You can add
@JvmName("fooNullable")
on the one that takes nullables for example