(Also posted here: https://stackoverflow.com/questions/70093836/variable-magically-changes-value)
I have this extremely weird scenario. Suddenly my test is failing and I can not create a reproduction path because it succeeds on simple projects. I also can not reproduce it consistently so I will show what is wrong:
You can see that the values that I used are different than the parameter values. This fails my test. I have never seen anything like this before. I am using Xcode 13.1. Is there anything I can try?
I am seeing more weird behavior. I pass in nil
as an parameter argument to a func
. In that func
, if the parameter is nil
, it should return. But Swift happely decides to just fill it with a value: