Preserve type projection for Array.requireNoNulls.

#KT-10039 Fixed
This commit is contained in:
Ilya Gorbunov
2015-12-28 19:29:03 +03:00
parent 90a33fb19c
commit 362e463b26
2 changed files with 3 additions and 4 deletions
@@ -8,8 +8,7 @@ fun guards(): List<GenericFunction> {
val templates = arrayListOf<GenericFunction>()
templates add f("requireNoNulls()") {
include(Lists)
exclude(Strings, ArraysOfPrimitives)
only(Iterables, Sequences, InvariantArraysOfObjects, Lists)
doc { "Returns an original collection containing all the non-`null` elements, throwing an [IllegalArgumentException] if there are any `null` elements." }
typeParam("T : Any")
toNullableT = true