!is supported in data flow info for ifs

This commit is contained in:
Andrey Breslav
2011-07-05 10:55:33 +04:00
parent b19ad2ccb8
commit 4121aed773
2 changed files with 7 additions and 1 deletions
@@ -147,3 +147,9 @@ fun f15(a : A?) {
<info descr="Automatically cast to B">a</info>.bar()
<error>c</error>.bar()
}
fun getStringLength(obj : Any) : Char? {
if (obj !is String)
return null
return <info>obj</info>.get(0) // no cast to String is needed
}