Too many arguments to function call, expected 0, have 3

后端 未结 11 1450
情话喂你
情话喂你 2020-12-12 18:55

This compiles/works fine with Xcode 5, but causes a compile error with Xcode 6 Beta 4:

objc_msgSend(anItem.callback_object,
NSSelectorFrom         


        
11条回答
  •  被撕碎了的回忆
    2020-12-12 19:33

    This block of code reproduces the error:

    - (void)reportSuccess:(void(^)(void))success
    {
        success(what_is_this);
    }
    

    Guess where error is? Of course, what_is_this is not declared, but somehow magically it shows another error. In other words looks like if you have block, you can put any parameters when calling it, even non existent variables.

提交回复
热议问题