fix some tests for as36

This commit is contained in:
Dmitry Gridin
2020-05-08 19:07:55 +07:00
parent ad09eb5416
commit 50506658c0
22 changed files with 319 additions and 0 deletions
@@ -0,0 +1,12 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'firstOrNull{}'"
// IS_APPLICABLE_2: false
fun getFirstValue() = "value"
fun foo(list: List<String?>): String? {
val value = getFirstValue()
val found: String? =
list.firstOrNull { it != null && !it.startsWith("IMG:") && it.contains(value) }
return found
}