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,10 @@
// WITH_RUNTIME
fun foo(list: List<String?>) {
var result: String? = null
<caret>for (s in list) {
if (s != "") {
result = s?.substring(1)
break
}
}
}