Why does the compiler allow the line below without errors or warnings? It seems that it should complain about the parameter mismatch in the “onSuccess” declaration and the definition.
I’m using Xcode 4.6 (LLVM 4.2)
void (^onSuccess)() = ^(AFHTTPRequestOperation *operation, id responseObject) {
};
This seems to work just like C function declarations. To Quote from the C99 standard:
Meaning, you can declare a function (and as it seems also a block) and not provide any information about parameters.