[SR-7707] EXC_BAD_ACCESS when returning nil before capturing any type inside double closure #50247
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
run-time crash
Bug → crash: Swift code crashed during execution
Additional Detail from JIRA
md5: bca83a35f84db3c7d86c2d575c3f3ef2
Issue Description:
Example:
This is a simplified version of an actual use case. I get a bad access exception when returning nil in the function above, however if the nested closures further down the function are removed it all works correctly.
Also, if I implicitly unwrap `object` in the function above at declaration it will also work correctly.
I tested this with multiple different compiler optimisation levels and in a playground and it failed each time.
The text was updated successfully, but these errors were encountered: