You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For background, the code motivating this bug is an Array extension:
extensionRangeReplaceableCollectionTypewhereGenerator.Element : AnyObject {
/// Remove first colleciton element that matches the given referencemutatingfuncremoveItemMatchingReference(object : Generator.Element) {
ifletindex = self.indexOf({$0 === object}) {
self.removeAtIndex(index)
}
}
}
This code can be used to remove a semaphore from an array.
It is actually quite nonintuitive to fix this code to compile on Linux (although I did), chiefly because there is nothing obvious one can replace the where Generator.Element : AnyObject with that works for dispatch_sempahore_t.
Are we not going to bridge the dispatch objects to AnyObject (e.g. not necessarily NSObject) on the Swift runtime? I know NSObject bridging isn't available, but I think AnyObject would be appropriate to bridge...
Environment
Linux x64
swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a
Additional Detail from JIRA
md5: 12999cfe1773782d3e3be803c7f86303
Issue Description:
in Darwin, the following program is legal:
On Linux, it produces the error:
The text was updated successfully, but these errors were encountered: