[Ikvm-developers] Attributes of synthesized inner interfaces
Brought to you by:
jfrijters
|
From: Michael B. <md...@sa...> - 2013-04-30 16:39:30
|
Now that I'm making use of IKVM stub classes from Scala (whee!), I'm
running into a problem due to Scala's compiler being a bit stricter than
Java's.
Specifically, when ikvmstub.exe emits synthetic inner-interfaces (in the
case of the inner Method interface for delegates and the inner Annotation
interface for attributes), the interfaces are not marked as "static", which
causes the Scala compiler to think they require an outer this pointer to be
instantiated. To be sure interfaces must always be static, but apparently
it would be nice if they were marked as such.
The javap output from an inner interface compiled by javac reports:
InnerClasses:
public static #9= #1 of #7; //Method=class NSAction$Method of class
NSAction
whereas the javap output from an inner interface generated by ikvmstub.exe
reports:
InnerClasses:
public #8= #2 of #7; //Method=class
cli/MonoTouch/Foundation/NSAction$Method of class
cli/MonoTouch/Foundation/NSAction
IKVM.NET.Assembly: length = 0x2
00 0A
Note "public" versus "public static".
I'm not familiar with the bytecode format and the generation process, but
I'm sure this is just a flag that needs to be set somewhere.
If it's an obvious fix, then yay! If not, I can dig through the
ikvmstub.exe source and figure out what needs to be done.
Thanks!
-- md...@sa...
|