Shader compiler error - not sure what's wrong

Ah, I should add a proper error message for that situation.

read more
Crash in Visual C++ release build...

One more: this code crashes in release build with /O2 optimization

static public var instance:ClassDescription = Type.createInstance(Type.resolveClass('typedEval.ClassDescriptionImpl'), []);

but this works fine

static public var instance:ClassDescription = { var cls = Type.resolveClass('typedEval.ClassDescriptionImpl'); trace(cls) Type.createInstance(cls, []); }

In C++ code that crashes looks like this

HXLINE( 19) instance = ( ( ::typedEval::ClassDescription) (::Type_obj::createInstance(::Type_obj::resolveClass(HX_("typedEval.ClassDescriptionImpl",0c,ad,5a,64)),::cpp::VirtualArray_obj::__new(0))) );

But if I modify it to

auto temp = ::Type_obj::resolveClass(HX_("typedEval.ClassDescriptionImpl", 0c, ad, 5a, 64)); HXLINE( 19) instance = ( ( ::typedEval::ClassDescription)(::Type_obj::createInstance(temp,::cpp::VirtualArray_obj::__new(0))) );

It begins to work.

I wonder why there were no such problems before. May be haxe 3.3 was generating different c++ code or may be there were different compilation options in kha? And what to do with this?

read more