Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
0801cc12da5af28d8009eb66d070f37079ab755d
/
.
/
idea
/
testData
/
intentions
/
loopToCallChain
/
firstOrNull
/
safeDotExpression.kt
blob: 03523647933a3ca9653cf279b3ca7bf195354e59 [
file
] [
log
] [
blame
]
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'firstOrNull{}'"
// IS_APPLICABLE_2: false
fun foo
(
list
:
List
<
String
?>)
{
var
result
:
String
?
=
null
<caret>
for
(
s
in
list
)
{
if
(
s
!=
""
)
{
result
=
s
?.
substring
(
1
)
break
}
}
}