swift 3.1 support

This commit is contained in:
John Estropia
2017-02-07 18:17:40 +09:00
parent 69d96c53d6
commit bdf6308d8f
29 changed files with 81 additions and 56 deletions

View File

@@ -675,9 +675,9 @@ public final class ListMonitor<T: NSManagedObject>: Hashable {
)
}
internal func upcast() -> ListMonitor<NSManagedObject> {
internal func downcast() -> ListMonitor<NSManagedObject> {
return unsafeBitCast(self, to: ListMonitor<NSManagedObject>.self)
return unsafeDowncast(self, to: ListMonitor<NSManagedObject>.self)
}
internal func registerChangeNotification(_ notificationKey: UnsafeRawPointer, name: Notification.Name, toObserver observer: AnyObject, callback: @escaping (_ monitor: ListMonitor<T>) -> Void) {

View File

@@ -210,9 +210,9 @@ public final class ObjectMonitor<EntityType: NSManagedObject>: Equatable {
cs_setAssociatedRetainedObject(nilValue, forKey: &self.didUpdateObjectKey, inObject: observer)
}
internal func upcast() -> ObjectMonitor<NSManagedObject> {
internal func downcast() -> ObjectMonitor<NSManagedObject> {
return unsafeBitCast(self, to: ObjectMonitor<NSManagedObject>.self)
return unsafeDowncast(self, to: ObjectMonitor<NSManagedObject>.self)
}
deinit {