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,12 @@
// WITH_RUNTIME
// IS_APPLICABLE: false
fun foo(list: List<String>, o: Any): Int? {
<caret>for (s in list) {
val length = s.length + (o as Int)
if (length > 0) {
val x = length * o
return x
}
}
return null
}