Error with Null<Bool>/Bool since 3.2.0-*

33 views
Skip to first unread message

Nathan Hüsken

unread,
Mar 26, 2015, 9:55:58 AM3/26/15
to haxe...@googlegroups.com

Hey,

Trying to compile my haxe/cpp project I get this error during the hxcpp phase:

Error: ./src/ru/stablex/Assets.cpp: In member function 'openfl::_v2::display::BitmapData ru::stablex::<unnamed>::__default_getBitmapData::run(String, hx::Null<bool>)':
./src/ru/stablex/Assets.cpp:71: error: cannot convert 'hx::Null<bool>' to 'bool' in initialization

The source lines this refers to are these:

    static dynamic public function getBitmapData(src:String, useCache:Bool = true) : flash.display.BitmapData {
        return #if openfl openfl.Assets.getBitmapData(src, useCache) #else null #end;
    }//function getBitmapData()

This is the generated c++ code:

HX_BEGIN_DEFAULT_FUNC(__default_getBitmapData,Assets_obj)
::openfl::_v2::display::BitmapData run(::String src,hx::Null< bool >  useCache){
    HX_STACK_FRAME("ru.stablex.Assets","getBitmapData",0xc0d9f520,"ru.stablex.Assets.getBitmapData","ru/stablex/Assets.hx",22,0xd2a01efd)
    HX_STACK_ARG(src,"src")
    HX_STACK_ARG(useCache,"useCache")
    HX_STACK_LINE(23)
    ::String tmp = src;        HX_STACK_VAR(tmp,"tmp");
    HX_STACK_LINE(23)
    bool tmp1 = useCache;        HX_STACK_VAR(tmp1,"tmp1");
    HX_STACK_LINE(23)
    ::openfl::_v2::display::BitmapData tmp2 = ::openfl::_v2::Assets_obj::getBitmapData(tmp,tmp1);        HX_STACK_VAR(tmp2,"tmp2");
    HX_STACK_LINE(23)
    return tmp2;
}

the offending line is:

bool tmp1 = useCache;        HX_STACK_VAR(tmp1,"tmp1");

Now, I do not know. Is that a problem in my code (or stablexui code)? Or a bug in haxe-3.2.0?

Thanks!
Nathan

signature.asc

Daniel Uranga

unread,
Mar 26, 2015, 11:00:33 AM3/26/15
to haxe...@googlegroups.com
Had this same issue, its fixed on Hxcpp git


--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages