tomaz/appledoc — Issue #147: Give file/line number info on Assert
Author: cgriffin
Created: 2011-11-02 16:45:06+00:00
State: open

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:

```- (void)myMethod:(NSObject *)obj anotherObject:aObject { }
```
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.