gregschlom
07/29/2016, 11:48 PMfoo
is nullable and we test that foo?.someMethod != null, why can't we infer that foo is non null?
For example:
fun test(foo: String?) {
if (foo?.length != null) {
foo.capitalize() // this doesn't work because apparently foo might be null. Why?
}
}