-
-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work around SR-6419 #483
Work around SR-6419 #483
Conversation
self?.observedNotifications.append(n) | ||
}) | ||
#else | ||
self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil, usingBlock: { [weak self] n in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line Length Violation: Line should be 120 characters or less: currently 130 characters (line_length)
} | ||
#elseif swift(>=4.0.2) || swift(>=3.2.2) | ||
// A workaround to SR-6419. | ||
self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil, using: { [weak self] n in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line Length Violation: Line should be 120 characters or less: currently 125 characters (line_length)
@lvsti Could you try with this branch? |
477e4fb
to
a0c3f66
Compare
// linux-swift gets confused by .append(n) | ||
self?.observedNotifications.append(n) | ||
} | ||
#elseif swift(>=4.0.2) || swift(>=3.2.2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately we can't use #if if swift(>=x.y.z)
in Swift 3.0 😞
1db6bc4
to
7550e7e
Compare
7550e7e
to
a62e07e
Compare
it ran without errors: https://travis-ci.org/lvsti/MockSix/jobs/303702207 👍 |
Work around SR-6419
https://bugs.swift.org/browse/SR-6419
Should fix #481.