KT-9284 Intention to convert to expression body doesn't work in particular case

#KT-9284 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-09-23 21:39:37 +03:00
parent 94204b7d4e
commit 45c3d74b42
6 changed files with 45 additions and 16 deletions
@@ -0,0 +1,8 @@
// WITH_RUNTIME
public fun List<String>.fn() : List<String> {
<caret>return map {
if (it.isEmpty()) return@map "<empty>"
it
}
}
@@ -0,0 +1,6 @@
// WITH_RUNTIME
public fun List<String>.fn() <selection>: List<String></selection><caret> = map {
if (it.isEmpty()) return@map "<empty>"
it
}
@@ -0,0 +1,8 @@
// WITH_RUNTIME
public fun List<String>.fn() : List<String> {
<caret>return map {
if (it.isEmpty()) return emptyList()
it
}
}
@@ -0,0 +1,6 @@
// WITH_RUNTIME
public fun List<String>.fn() : List<String> = map {
if (it.isEmpty()) return emptyList()
it
}