From 29615d038c131be9b5bce24b0866132f518e4a07 Mon Sep 17 00:00:00 2001 From: MeXx Date: Sat, 16 Aug 2014 22:13:11 +0200 Subject: [PATCH] Explicitly comparing optionals with nil due to language changes in Xcode 6 beta 5 --- templates/machine.swift.motemplate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/machine.swift.motemplate b/templates/machine.swift.motemplate index 72dc3c65..a8cddc0d 100644 --- a/templates/machine.swift.motemplate +++ b/templates/machine.swift.motemplate @@ -118,7 +118,7 @@ class _<$managedObjectClassName$>: <$customSuperentity$> { var result: AnyObject? = nil let results = managedObjectContext.executeFetchRequest(fetchRequest, error: &error) - if error { + if error != nil { outError.memory = error } else { switch results.count { @@ -154,7 +154,7 @@ class _<$managedObjectClassName$>: <$customSuperentity$> { var error: NSError? = nil let results = managedObjectContext.executeFetchRequest(fetchRequest, error: &error) - if error { + if error != nil { outError.memory = error }