Skip to content

Commit

Permalink
Explicitly comparing optionals with nil due to language changes in Xc…
Browse files Browse the repository at this point in the history
…ode 6 beta 5
  • Loading branch information
MeXx committed Aug 16, 2014
1 parent 5ee430c commit 29615d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/machine.swift.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 29615d0

Please sign in to comment.