Support methods with no type information #147

cgriffin opened this Issue Nov 2, 2011 · 1 comment


None yet
2 participants

cgriffin commented Nov 2, 2011

On line 29 of GBMethodArgument is the following code:

NSParameterAssert(([types count] == 0 && var == nil) || ([types count] > 0 && var != nil));

This assert was failing on my project. I traced it to a missing argument type declaration. In one of my .m files. I had something like this:

The method declaration was correct in the .h file however. Now why the compiler did complain I don't know. So there is actually a valid situation where the assert above would fail. Depending on you definition of "valid". :) The feature would be to spit out the file and line number where this occurred to help the user find the issue.


tomaz commented Nov 2, 2011

Your case is valid objective-c method declaration, as you've deducted. appledoc currently requires type info (for no particular reason, it just simplified coding and I think it's good practice to keep type in method declaration too). And nobody complained (up until now :)). Will mark this as bug and see how much work it would require to make it optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment