Checking that smart casts will not be broken by conversion

This commit is contained in:
Valentin Kipyatkov
2016-03-24 12:37:35 +03:00
parent 978fc468fa
commit 8c498af3d8
12 changed files with 162 additions and 2135 deletions
@@ -0,0 +1,11 @@
// WITH_RUNTIME
// IS_APPLICABLE: false
fun foo(list: List<Any>, o: Any): Int? {
<caret>for (s in list) {
if (s is String && s.length > 0) {
val x = s.length * 2
return x
}
}
return null
}