Generating more simple construct instead of "let" in some cases

This commit is contained in:
Valentin Kipyatkov
2016-04-06 12:25:39 +03:00
parent a760ef3665
commit ff0bb4fbb8
7 changed files with 52 additions and 3 deletions
@@ -0,0 +1,4 @@
// WITH_RUNTIME
fun foo(list: List<String?>) {
<caret>val result: String? = list.firstOrNull { it != "" }?.substring(1)
}