Join Slack
Powered by
the only way to have intersection types as return ...
# stdlib
k
kirillrakhman
04/18/2016, 2:08 PM
the only way to have intersection types as return types is to let the compiler infer it:
fun <T> intersection() = if (true) mutableListOf<T>() else null as RandomAccess
but this was specifically prevented by
@dmitry.petrov
IIRC
3
Views
Open in Slack
Previous
Next