Update of bug #41586 (project gnustep):
Status: Need Info => None
Open/Closed: Open => Analyzed
_______________________________________________________
Follow-up Comment #4:
Actually, prompted by where you got to in gdb, I took a second look at your
testcase and realised that the problem here is that the testcase is wrong
rather than there being any bug in invocation forwarding.
Your gdb trace got *past* the code which should have done the type lookup, and
as far as some code which tries to be friendly to buggy applications and guess
what the types are intended to be … if the runtime knows about types, and
only knows of one signature for a selector, it can infer the type signature
with fairly reliably.
Anyway, to get back to your test case;
The test code is not actually attempting to forward anything, rather it's
trying to log a message when -forwardInvocation: is called, and you forgot to
implement the -methodSignatureForSelector: method in your forwarding class, so
the system won't know what type information to use. If you try out your
testcase on OSX for instance, it will raise an exception there too.
To get your test to work, I think you need to implement something like this:
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector
{
if (sel_isEqual(aSelector, @selector(name)))
{
return [Dummy instanceMethodSignatureForSelector: aSelector];
}
return [super methodSignatureForSelector: aSelector];
}
Please let me know if that fixes it for you.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?41586>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-gnustep