Light Elements: Filter out nulls when converting Kotlin declarations to corresponding light elements

#EA-64403 Fixed
This commit is contained in:
Alexey Sedunov
2015-05-28 18:27:11 +03:00
parent fed8047a59
commit 26c4efb587
2 changed files with 9 additions and 5 deletions
@@ -21,6 +21,8 @@ import java.util.NoSuchElementException
public fun <T: Any> T?.singletonOrEmptyList(): List<T> = if (this != null) Collections.singletonList(this) else Collections.emptyList()
public fun <T> T.singletonList(): List<T> = Collections.singletonList(this)
public fun <T: Any> T?.singletonOrEmptySet(): Set<T> = if (this != null) Collections.singleton(this) else Collections.emptySet()
public inline fun <reified T : Any> Stream<*>.firstIsInstanceOrNull(): T? {