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

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@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

This comment has been minimized.

Show comment
Hide comment
@chrisp-fb

chrisp-fb Oct 7, 2015

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.

Contributor

chrisp-fb commented Oct 7, 2015

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