blob: 636485d013e80adc4ce9096601b12543456b917a [file]
// RUN_PIPELINE_TILL: CODEGEN
// TARGET_BACKEND: JVM
// WITH_STDLIB
// MODULE: lib
// MODULE: main()()(lib)
fun nullIfEmpty(list: List<String>): List<String>? {
return if (list.isNotEmpty()) {
list
} else {
null
}
}
/* GENERATED_FIR_TAGS: functionDeclaration, ifExpression, nullableType */