Shouldn't ``` public operator fun <T> Iterab...
# stdlib
i
Shouldn't
Copy code
public operator fun <T> Iterable<T>.minus(element: T): List<T>
be defined with element as nullable?
Copy code
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. 13 replies This has to investigated, whether it's possible to add something like this: https://github.com/JetBrains/kotlin/blob/1.1.0/libraries/stdlib/src/kotlin/collections/MutableCollections.kt#L15 so that type of element to be removed could be any direct supertype of element type of the collection.