You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few months ago I started updating hxcpp's internal throw functions to use the C++ [[noreturn]] annotation to avoid needing to have return null() peppered around to make C++ compilers happy, but I ran into an issue I forgot about until now.
The generated Reflect.callMethod C++ seems to contain doubled up throws in it.
Initially I thought this might be a bug with gencpp but I don't think it is, looking at the pretty dump of the code the double throws appears there as well.
@:keep @:directlyUsed @:used @:coreApi @:analyzer(ignore)
classReflect {
@:has_untypedpublicstaticfunctioncallMethod(o:Dynamic, func:haxe.Function, args:Array<Dynamic>) {
if ((func!=null&&func.__GetType() ==3)) {
if ((o==null)) throwthrowcpp.ErrorConstants.HX_INVALID_OBJECT;
func=o.__Field(func, __cpp__("::hx::paccDynamic"));
};
if ((func==null)) throwthrowcpp.ErrorConstants.HX_NULL_FUNCTION_POINTER;
func.__SetThis(o);
returnfunc.__Run(args);
}
}
These double throws does not appear in the original Reflect.callMethod and I have not been able to re-create this outside of this function yet.
publicstaticfunctioncallMethod(o:Dynamic, func:haxe.Constraints.Function, args:Array<Dynamic>):Dynamicuntyped {
if (func!=null&&func.__GetType() ==ObjectType.vtString) {
if (o==null)
throwcpp.ErrorConstants.invalidObject;
func=o.__Field(func, untyped__cpp__("::hx::paccDynamic"));
}
if (func==null)
throwcpp.ErrorConstants.nullFunctionPointer;
untypedfunc.__SetThis(o);
returnuntypedfunc.__Run(args);
}
The text was updated successfully, but these errors were encountered:
A few months ago I started updating hxcpp's internal throw functions to use the C++ [[noreturn]] annotation to avoid needing to have
return null()
peppered around to make C++ compilers happy, but I ran into an issue I forgot about until now.The generated Reflect.callMethod C++ seems to contain doubled up throws in it.
Initially I thought this might be a bug with gencpp but I don't think it is, looking at the pretty dump of the code the double throws appears there as well.
These double throws does not appear in the original Reflect.callMethod and I have not been able to re-create this outside of this function yet.
The text was updated successfully, but these errors were encountered: