Issue 28: inline methods causing errors with null values
Status:  Fixed
Owner: ----
Closed:  Jul 2010
Reported by lucadelt...@googlemail.com, Jun 15, 2010
Simplest example to demonstrate the error:

--------------------------

package;

import neash.Lib;

class Main {
    static inline function offender(obj:Dynamic) {
       if(obj!=null) obj.value = 10;
    }
    static function main() {
        offender(null);
    }
}

-----------------------

hxcpp code for code generating error:

-----------------------

Void Main_obj::main( ){
{
        if ((null() != null()))
            null() = 10;    // error here
    }
return null();
}

-----------------------

i've never had such an issue before in C++ my compiler would always eliminate dead code before worrying about such things, so i don't know if this is simply microsoft's compiler being shit.


Jun 15, 2010
#1 lucadelt...@googlemail.com
nah same thing happens with different compilers, so it seems hxcpp inline just isn't smart enough to deal with a case like this.
Jul 29, 2010
Project Member #2 gameh...@gmail.com
Fixed on haxe SVN
Status: Fixed