mg6maciej
04/24/2017, 11:51 AMpublic operator fun <T> Iterable<T>.minus(element: T): List<T>
be defined with element as nullable?
public operator fun <T> Iterable<T>.minus(element: T?): List<T>
I.e. if you call listOf<String>(...) - null as String? it would just return the same List<String> and not List<String?> as it currently does.
1 reply
Anyone has any input on this idea? I think such a change could be implemented without breaking any code using minus currently. It could even be changed to element: Any?, but I'm not sure this would be very useful.