Skip to content

Instantly share code, notes, and snippets.

@danhper
Last active December 20, 2015 00:19
Show Gist options
  • Save danhper/6040784 to your computer and use it in GitHub Desktop.
Save danhper/6040784 to your computer and use it in GitHub Desktop.
// wrong
switch(foo) {
case 1:
NSString* bar = @"foobar"; // expected expression
// use bar
}
// compiles
switch(foo) {
case 1: {
NSString* bar = @"foobar";
// use bar
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment