Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify blocks as taking no parameters, not unspecified parameters #795

Closed
wants to merge 1 commit into from

Conversation

jmah
Copy link

@jmah jmah commented Oct 1, 2015

A block or function with parameters () means "unspecified parameters", so the following code compiles and runs without complaint:

void (^clearToken)() = ^{ ... };
clearToken(@"hi", 13, NO);

Change to (void) meaning "no parameters". Also standardize on ^{ to open a block with no parameters (from a mix of ^{ and ^() {).

@chrisp-fb
Copy link
Contributor

hey jmah@ - thanks, we accepted this and pushed it in the release today but forgot to accept the actual pull request on the dev branch.

@chrisp-fb chrisp-fb closed this Oct 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants