WIP: Swift 3.2

This commit is contained in:
John Estropia
2017-06-07 20:07:43 +09:00
parent f9b6dd0c6a
commit 7f9a915d71
37 changed files with 199 additions and 200 deletions

View File

@@ -100,7 +100,7 @@ public final class AsynchronousDataTransaction: BaseDataTransaction {
- parameter into: the `Into` clause indicating the destination `NSManagedObject` or `CoreStoreObject` entity type and the destination configuration
- returns: a new `NSManagedObject` or `CoreStoreObject` instance of the specified entity type.
*/
public override func create<T: DynamicObject>(_ into: Into<T>) -> T {
public override func create<T>(_ into: Into<T>) -> T {
CoreStore.assert(
!self.isCommitted,
@@ -133,7 +133,7 @@ public final class AsynchronousDataTransaction: BaseDataTransaction {
- parameter objectID: the `NSManagedObjectID` for the object to be edited
- returns: an editable proxy for the specified `NSManagedObject` or `CoreStoreObject`.
*/
public override func edit<T: DynamicObject>(_ into: Into<T>, _ objectID: NSManagedObjectID) -> T? {
public override func edit<T>(_ into: Into<T>, _ objectID: NSManagedObjectID) -> T? {
CoreStore.assert(
!self.isCommitted,
@@ -266,9 +266,9 @@ public final class AsynchronousDataTransaction: BaseDataTransaction {
}
switch childTransaction.result {
case nil: return nil
case (let hasChanges, nil)?: return SaveResult(hasChanges: hasChanges)
case (_, let error?)?: return SaveResult(error)
case .none: return nil
case .some(let hasChanges, nil): return SaveResult(hasChanges: hasChanges)
case .some(_, let error?): return SaveResult(error)
}
}
}