optimize redundant casting in printCoreStoreSchema()

This commit is contained in:
John Estropia
2017-08-31 18:28:23 +09:00
parent 68f1027ba7
commit 3ebc44b546

View File

@@ -114,7 +114,7 @@ public extension DynamicSchema {
}
case .decimalAttributeType:
valueType = NSDecimalNumber.self
if let defaultValue = (attribute.defaultValue as! NSDecimalNumber.ImportableNativeType?).flatMap(NSDecimalNumber.cs_fromImportableNativeType) {
if let defaultValue = (attribute.defaultValue as! NSDecimalNumber?) {
defaultString = ", initial: NSDecimalNumber(string: \"\(defaultValue.description(withLocale: nil))\")"
}