d
Will do.
o
The root cause is that
in
resolves to different
contains
with smart cast and without
j
The weird thing about this example here is that with two different call's to
thing
you are getting two different values.
Copy code
if (thing != null // This could evaluate to `true`
        && 
        thing in list // `thing` can be null here.
        ) { // fails
        
    }
@orangy
o
yes, exactly, that’s why smart-cast doesn’t work
j
It's a convoluted use case and probably not what the developer means, but it should compile regardless.
o
It will be the same with a simple
var
, because it can be modified on a different thread
d
Yes, I don't know why I put that random thing there.
It's not relevant to the issue at all.