Re: [swift-users] Law of Exclusivity runtime false positive?

2017-07-28 Thread Joe Groff via swift-users
> On Jul 28, 2017, at 12:06 AM, David Hart via swift-users > wrote: > > Hello, > > Indeed, I had reduced the code too much. John McCall was kind enough to have > a look and here’s the offending code: > > func layoutHorizontally(leftRect: inout CGRect, rightRect: inout CGRect) { > let tot

Re: [swift-users] Law of Exclusivity runtime false positive?

2017-07-28 Thread Jonathan Prescott via swift-users
Is is possible that the compiler optimized away the call to trigger because it reasoned that you were not really changing any state at all? Because the trigger function is making an assignment of input to output, and the call instance is asking to make a copy of itself, the compiler could reaso

Re: [swift-users] Law of Exclusivity runtime false positive?

2017-07-28 Thread David Hart via swift-users
Hello, Indeed, I had reduced the code too much. John McCall was kind enough to have a look and here’s the offending code: func layoutHorizontally(leftRect: inout CGRect, rightRect: inout CGRect) { let totalWidth = imageRect.size.width + titleRect.size.width + contentSpacing rightRect.or