Checking type of the collection being iterated

This commit is contained in:
Valentin Kipyatkov
2016-05-11 22:26:51 +03:00
parent 89dab52a14
commit 394cce8e10
9 changed files with 96 additions and 4 deletions
+9
View File
@@ -0,0 +1,9 @@
// WITH_RUNTIME
fun foo(array: Array<String>): String? {
<caret>for (s in array) {
if (s.isNotBlank()) {
return s
}
}
return null
}