ArgumentError loop

Is it correct if

flash.errors.ArgumentError is

package flash.errors; #if (!display && flash)

@:native("ArgumentError") extern class ArgumentError extends Error {}

#else
typedef ArgumentError = openfl.errors.ArgumentError;
#end

and openfl.errors.ArgumentError is

package openfl.errors; #if (display || !flash)

extern class ArgumentError extends Error {}

#else
typedef ArgumentError = flash.errors.ArgumentError;
#end

?
It is detected by HaxeDevelop as an inheritance loop…

…or at least I think these are the culprit classes.

flash.errors.ArgumentError: #if (!display && flash

If we are not performing code completion or documentation, and we are running on the Flash target, use flash.errors.ArgumentError, otherwise use openfl.errors.ArgumentError

openfl.errors.ArgumentError: #if (display || !flash)

If we are performing code completion or documentation, or we are not running on the Flash target, use openfl.errors.ArgumentError and not flash.errors.ArgumentError

I think this is sound, but maybe FlashDevelop is not aware (or sensitive to) the defines?

I remember that FlashDevelop would ignore things like #if. But usually this meant that it took the first definition and ignored the typedef at the bottom. Not sure why it would be different for these two classes.

Maybe it has both in its class path, and is picking the first definition in both?