Skip to content

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

Closed
jmah wants to merge 1 commit intofacebook:devfrom
jmah:block-types
Closed

Specify blocks as taking no parameters, not unspecified parameters#795
jmah wants to merge 1 commit intofacebook:devfrom
jmah:block-types

Conversation

@jmah
Copy link
Copy Markdown

@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
Copy Markdown
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