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

2017-07-30 Thread Andrew Trick via swift-users
> On Jul 30, 2017, at 5:11 AM, David Hart via swift-users > wrote: > >> >> On 28 Jul 2017, at 18:55, Joe Groff > > wrote: >> >>> >>> On Jul 28, 2017, at 12:06 AM, David Hart via swift-users >>>

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

2017-07-30 Thread David Hart via swift-users
> On 28 Jul 2017, at 18:55, Joe Groff wrote: > >> >> 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

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

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

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

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

2017-07-27 Thread Kyle Murray via swift-users
Hi David, Are padding or spacing computed properties that access either rectangle? They aren't defined in your stripped down code. For example: var spacing: CGFloat { return imageRect.maxX } Without doing something like that, I don't see the same access conflicts that you're seeing.

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

2017-07-27 Thread David Hart via swift-users
Hello, In Xcode 9 beta 4, Swift 4, I’m getting runtime errors popping up for Simultaneous accesses and I think they may be false negatives. Here’s a stripped down version of my code: class MyButton: UIButton { fileprivate var imageRect: CGRect = .zero fileprivate var titleRect: