Closed codeanticode closed 2 years ago
How very bizarre. Thanks for the bug report. I'll verify on my Mac soon.
@adamfowleruk Although it seems rare, people have reported it (for other complex instructions, not bitwise operations):
and there is some more info about it here:
I created a PR with the fix: https://github.com/theheraldproject/herald-for-ios/pull/174/
Describe the bug
Latest version of the XCode compiler (tested on XCode Version 13.3 (13E113)) give an error on this line:
https://github.com/theheraldproject/herald-for-ios/blob/f227f4d5c8281168f65f6e86df7e41bb89a047b1/Herald/Herald/Sensor/Extensions/DataExtensions.swift#L239
saying that the line cannot be type-checked because the expression is too long… See the screenshot from XCode highlighting the error message:
A simple solution seems to break up the bit-shifting operation into two separate operations, as suggested by the compiler: