Missing Code Attribute with module-export
Per Bothner
per@bothner.com
Tue Apr 1 20:15:00 GMT 2003
Chris Dean wrote:
> Kawa can produce an empty code attribute when using define-simple-class
> in the same file as module-export. This will throw an exception when
> the resulting class is loaded:
>
> Exception in thread "main" java.lang.ClassFormatError: Bar (Code
> attribute is absent in method that is not abstract or native)
>
> Below is a simple example to reproduce the problem. As a work around
> you may comment out the module-export expression, in which case
> Bar.class is fine.
The attached patch should fix the problem.
However, we would also like a non-exported class to not be PUBLIC.
This is a little tricky (a simple fix breaks the testsuite).
Perhaps it's enough that the ClassType field isn't public.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SetExp.patch
URL: <http://sourceware.org/pipermail/kawa/attachments/20030401/2519a9c5/attachment.ksh>
More information about the Kawa
mailing list