also super-frustrating in android land when you’ve...
# language-proposals
e
also super-frustrating in android land when you’ve got a non-final field and you know you’re in a single-threaded access situation. can’t do
Copy code
if (nonFinalOptional != null) {
  nonFinalOptional.bar()
}
the smart cast can’t happen bc it rightfully thinks nonFinalOptional could be modified in the middle. i end up having to define the thing as a local final var before the if check. just messy
1