Open giuseppebertolini opened 4 years ago
It shouldn't, can you give me more code sample when the issue happened?
Thanks for replying quickly! It happened to me when using the ternary operator "?:"
the code would go from this: x ? -1 : 1
to x ? - 1: 1
. It may help you knowing that this: x ? 1 : -1
would be formatted as x ? 1: -1
, which is still correct.
Have a good day!
It should work, may I ask your app version?
Hi
This issue appears to be happening for me. Xcode Version 12.5 (12E262), Swimat Version 1.7.0 (21), macOS 11.3.
This code:
shapeRect = NSInsetRect(
shapeRect,
CGFloat(
-(borderThickness - 1.0)),
CGFloat(
-(borderThickness - 1.0)))
Is changed to:
shapeRect = NSInsetRect(
shapeRect,
CGFloat(
- (borderThickness - 1.0)),
CGFloat(
- (borderThickness - 1.0)))
The error from Xcode is "Unary operator cannot be separated from its operand".
Cheers
Ian
it separates minuses and pluses from the number/variable following them which introduces errors. ex "-1" -> "- 1"