force dynamic typing on DynamicObject.Type to mitigate optimization issues

This commit is contained in:
John Estropia
2017-11-01 11:33:41 +09:00
parent 305e2b61a0
commit 21961780d4

View File

@@ -121,7 +121,7 @@ extension CoreStoreObject {
return unsafeDowncast(coreStoreObject, to: self)
}
func forceTypeCast<T: CoreStoreObject>(_ type: DynamicObject.Type, to: T.Type) -> T.Type {
func forceTypeCast<T: CoreStoreObject>(_ type: AnyClass, to: T.Type) -> T.Type {
return type as! T.Type
}