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,8 @@
// WITH_RUNTIME
fun foo(list: List<String>, o: Any): Int? {
<caret>return list
.map { it.length + (o as Int) }
.filter { it > 0 }
.map { it * o.hashCode() }
.firstOrNull()
}