Type narrowing

@1-877-547-7272 You just jogged my memory on this...

Type narrowing doesn't work well for mutable stored properties and computed properties. There's no guarantee that it being non-nil at the time of first check will mean it's still nil when called the second time.

See Yelling at a rocket after launch: checked optionals - #9 by AlexanderM

4 Likes