From: Markus H. <ma...@ti...> - 2010-06-22 11:49:13
|
Hi, Converting the following class from java to objc generates wrong objc code. public class Main extends UIApplication { public void applicationDidFinishLaunching(UIApplication app) { //... } public static void main(String[] args) { UIApplication.main(args, Main.class); } public abstract class AbstractTest{ } public class Test1 extends AbstractTest{ } public class Test2 extends AbstractTest{ } } I get this in the Objc .h file for AbstractTest @interface mylib_Main_AbstractTest : MyObject { @public mylib_Main* this_0_mylib_Main; } this for Test1 @interface mylib_Main_Test1 : mylib_Main_AbstractTest { @public mylib_Main* this_0_mylib_Main; } and this for Test2 @interface mylib_Main_Test2 : mylib_Main_AbstractTest { @public mylib_Main* this_0_mylib_Main; } So the reference back to the enclosing class is generated in each of this @interface declarations. This gives compile errors in both mylib_Main_Test1 and mylib_Main_Test2: /Users/markus/Documents/workspace/xmlvm/test/src/xcode/trim/mylib_Main_Test1.h:15:0 /Users/markus/Documents/workspace/xmlvm/test/src/xcode/trim/mylib_Main_Test1.h:15: error: duplicate member 'this_0_mylib_Main' Is it possible to fix xmlvm to generate better code for such java constructs? Regards, Markus |