From 21961780d484a4204cd9931f752ccc61b0a311e9 Mon Sep 17 00:00:00 2001 From: John Estropia Date: Wed, 1 Nov 2017 11:33:41 +0900 Subject: [PATCH] force dynamic typing on DynamicObject.Type to mitigate optimization issues --- Sources/DynamicObject.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/DynamicObject.swift b/Sources/DynamicObject.swift index cf148af..b6af806 100644 --- a/Sources/DynamicObject.swift +++ b/Sources/DynamicObject.swift @@ -121,7 +121,7 @@ extension CoreStoreObject { return unsafeDowncast(coreStoreObject, to: self) } - func forceTypeCast(_ type: DynamicObject.Type, to: T.Type) -> T.Type { + func forceTypeCast(_ type: AnyClass, to: T.Type) -> T.Type { return type as! T.Type }