Skip to content

Instantly share code, notes, and snippets.

@mafellows
Created October 13, 2016 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mafellows/f79d81a87b99417b8e0db3c26b261fde to your computer and use it in GitHub Desktop.
Save mafellows/f79d81a87b99417b8e0db3c26b261fde to your computer and use it in GitHub Desktop.
// Generates a compiler error
foos.forEach { foo in
guard let bar = foo else { continue }
print(bar)
}
// Works fine.
for foo in foos {
guard let bar = foo else { continue }
print(bar)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment