This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: module-implements


On 09/13/2010 11:06 AM, Jamison Hope wrote:
Hey Per, am I missing something, or does module-implements not work?
...
Regardless of where in the file I put the "(module-implements
java.awt.event.ActionListener)" line, the resultant class only ever
implements java.lang.Runnable.

Indeed. This is an issue of compiler needing some information before it is set/calculated. A general problem whenever forward references are allowed. It's not clear what is the "right" solution, but I notice that on 2008-12-23 I made a change for module-extends, and so the logical change would be to do the same for module-implements.

The attached patch should work.

Also, the documentation says that if there is a module-implements
declaration, then (module-static #f) is implied.
But if I remove the explicit "(module-static #f)" and recompile, then
actionPerformed() and action$Mnperformed are static:

That seems to be fixed with the attached patch.


I don't see any test cases in trunk/testsuite, so I imagine
module-implements has never left the experimental stage.

No, I believe it actually working at one point, but whatever change necessitated the 2008-12-23 change for module-extends probably also broke module-implements, and it wasn't caught because of a missing test-case. I'd like to add a test-case before I check the fix in. -- --Per Bothner per@bothner.com http://per.bothner.com/

Attachment: impl.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]