Like @Max suggested, it definitely happens around guard utilizing the same outer scope var name for the local scope. It's incredibly difficult to reproduce though. I've ran into this a few times now, and it's always around refactor changes, specifically variable name changes around these scopes. It feels as if precompiled/cached/magic fails to recognize the change and then is unable to bust the cache. The stack trace seems to drop you off somewhat near recent changes that have been done, but doesn't give you any other hints. Compiler isn't going to give you any hints either, sounds like a brute force trial and error where you start looking for your wallet in the microwave, or debugging purely off superstition. So thanks and sorry to ya'll who were able to track this down.
Topic:
Programming Languages
SubTopic:
Swift
Tags: