relax NSManagedObject return types so callers don't need to cast every time

This commit is contained in:
John Estropia
2016-05-10 21:49:50 +09:00
parent 57b66cff34
commit 8b95d337a3
10 changed files with 32 additions and 32 deletions

View File

@@ -55,7 +55,7 @@ public class CSBaseDataTransaction: NSObject, CoreStoreObjectiveCType {
- returns: a new `NSManagedObject` instance of the specified entity type.
*/
@objc
public func createInto(into: CSInto) -> NSManagedObject {
public func createInto(into: CSInto) -> AnyObject {
return self.bridgeToSwift.create(into.bridgeToSwift)
}
@@ -68,7 +68,7 @@ public class CSBaseDataTransaction: NSObject, CoreStoreObjectiveCType {
*/
@objc
@warn_unused_result
public func editObject(object: NSManagedObject?) -> NSManagedObject? {
public func editObject(object: NSManagedObject?) -> AnyObject? {
return self.bridgeToSwift.edit(object)
}
@@ -82,7 +82,7 @@ public class CSBaseDataTransaction: NSObject, CoreStoreObjectiveCType {
*/
@objc
@warn_unused_result
public func editInto(into: CSInto, objectID: NSManagedObjectID) -> NSManagedObject? {
public func editInto(into: CSInto, objectID: NSManagedObjectID) -> AnyObject? {
return self.bridgeToSwift.edit(into.bridgeToSwift, objectID)
}