Accurate representation of smart casts on complex expressions

This commit is contained in:
Mikhail Glukhikh
2015-12-08 17:30:01 +03:00
parent 7cd867b936
commit 745a3aeeac
11 changed files with 102 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
fun baz(s: String?): Int {
if (s == null) return 0
return <info descr="Smart cast to kotlin.String">when</info>(<info descr="Smart cast to kotlin.String">s</info>) {
"abc" -> s
else -> "xyz"
}.length
}