|
|
|
This is a patch from groovy-core/src.
This patch includes all of the test cases from the previous patch and a fix for the issue. I have added an interfaceMetaMethod property to MetaMethod. This allows MetaMethod to know if the method it is invoking was declared on an interface. Then the logic to invoke the method checks to see if the type of MetaMethod.method implementing class == the type of the target object. If it does not and there is an interfaceMetaMethod it delegates the invocation to the interfaceMetaMethod. In MetaClass I've added a new method that wires a newly create MetaMethod to its implementing MetaMethod if one exists. This is called from createMetaMethod(). All existing tests in the current trunk pass with this patch applied. Hi Mark,
I had a quick look at this issue, and the Groovy code base has changed a little since. Do you still encounter the same problem? If yes, could I ask you to update your patch, please? Hi Guillaume,
I've tried out the 1.1-beta-3 from http://repo1.maven.org/maven2/groovy/groovy-all/1.1-beta-3/ If I have time I will check out the SVN and take a look at this again. (I'm a bit buried on a project right now.) What is the time to the first RC? And does this need to be fixed before then to make it into 1.1? Mark We plan to release RC-1 tomorrow evening (ie in 24 hours or so).
And 1.1 mid-November. As it's a "bug fix" and not a "feature", we can include the fix in after tomorrow if you don't have time to look till tomorrow. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
This patch includes all of the test cases from the previous patch and a fix for the issue.
I have added an interfaceMetaMethod property to MetaMethod. This allows MetaMethod to know if the method it is invoking was declared on an interface. Then the logic to invoke the method checks to see if the type of MetaMethod.method implementing class == the type of the target object. If it does not and there is an interfaceMetaMethod it delegates the invocation to the interfaceMetaMethod.
In MetaClass I've added a new method that wires a newly create MetaMethod to its implementing MetaMethod if one exists. This is called from createMetaMethod().
All existing tests in the current trunk pass with this patch applied.