From: Markus H. <ma...@ti...> - 2009-10-30 18:36:18
|
Hi, take this code convert it to objc and run it: public class Test{ Object thisIsNotInitialized; void test(){ if(thisIsNotInitialized==null) System.out.println("null"); } public static void main(String[] args){ new Test().test(); } } I would expect to get "null" printed to the console. But that doesn't happen. The generated if is something like thos: if (_op1.o != [NSNull null]) goto label0; So it checks for [NSNull null]. But _op1.o contains 0x0 and the check is false. So I would guess that the initialization code of the ObjC variables has to be changed so that they contain [NSNull null] and not 0x0 by default. Hope you get what I mean. Markus |