[CEDET-devel] Re: [eieio] :before and :after methods not called
Brought to you by:
zappo
From: drkm <dar...@ya...> - 2005-04-04 08:34:06
|
drkm <dar...@ya...> writes: > "Eric M. Ludlam" <er...@si...> writes: >> I checked in changes to eieio to do this mechanism for method calls. >> I submitted a new test file for methodinvocation tests. > Good news. I just take a look at this new file. In the second test, you include (F :PRIMARY B-base2) in the result, if I understand. IMHO, it must not be there. The standard method combination take the first applicable primary method, (F :PRIMARY B), because B is the most derived class. This method call call-next-method. So (F :PRIMARY B-base1) is called. B-base1 take precedence over B-base2, because it stands more on the left in the superclass list from the definition of the class B. Because this method doesn't call call-next-method, (F :PRIMARY B-base2) is not called at all. BTW, in the first test, I think it's better to not define (F :PRIMARY AAA). So the result will have to be: (F :BEFORE AAA) (F :BEFORE AA) (F :BEFORE A) (F :PRIMARY AA) (F :AFTER A) (F :AFTER AA) (F :AFTER AAA) I guess starting at different "levels" could be better for testing. Maybe introduce a "hole" in the :BEFORE and :AFTER lists could be of some benefit, too. Like something like that: (F :BEFORE AAA) (F :BEFORE A) (F :PRIMARY AA) (F :AFTER A) (F :AFTER AAA) To be sure the implementation don't just walk in the class inheritence graph until some nil is encountered (or something like that). Thanks, --drkm |