Files
kotlin-fork/compiler/testData/diagnostics/tests/noLibraryProvidersDuplication.kt
T
Ivan Kochurkin 194d1cfccf [FIR] Filter out incorrect library provides for dependencyProviders
Get rid of providers duplication
2022-11-23 18:29:29 +00:00

15 lines
233 B
Kotlin
Vendored

// FIR_IDENTICAL
// TARGET_BACKEND: JVM
// WITH_STDLIB
// MODULE: lib
// MODULE: main()()(lib)
fun nullIfEmpty(list: List<String>): List<String>? {
return if (list.isNotEmpty()) {
list
} else {
null
}
}