mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-21 08:59:08 +01:00
Merge branch 'develop' into prototype/Swift_3_2
This commit is contained in:
@@ -121,7 +121,12 @@ extension CoreStoreObject {
|
||||
|
||||
return unsafeDowncast(coreStoreObject, to: self)
|
||||
}
|
||||
let coreStoreObject = self.init(rawObject: object)
|
||||
@inline(__always)
|
||||
func forceTypeCast<T: CoreStoreObject>(_ type: DynamicObject.Type, to: T.Type) -> T.Type {
|
||||
|
||||
return type as! T.Type
|
||||
}
|
||||
let coreStoreObject = forceTypeCast(object.entity.dynamicObjectType!, to: self).init(rawObject: object)
|
||||
object.coreStoreObject = coreStoreObject
|
||||
return coreStoreObject
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user