One more case for nullability: comparison to a non-null expression

This commit is contained in:
Andrey Breslav
2011-06-12 15:32:50 +04:00
parent 70ed1f8083
commit 11c0d924a6
2 changed files with 52 additions and 16 deletions
+17
View File
@@ -255,3 +255,20 @@ fun f7(s : String?, t : String?) {
t?.get(0)
}
}
fun f8(b : String?, a : String) {
b?.get(0)
if (b == a) {
b.get(0);
}
b?.get(0)
if (a == b) {
b.get(0)
}
if (a != b) {
b?.get(0)
}
else {
b.get(0)
}
}