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
var x:Class<String> = String;
trace(Std.isOfType(str, Class)
compiles, but when run it prints False because of how isOfType is implemented on Python
I ran this issue when writing serialization logic where I needed to detect if a Dynamic is a Class object, where isOfType(x, Class) returned False where x is Python str. Ideally, isOfType could returns True for str and other python types that represent extern Haxe classes, or maybe just return if python_lib_Inspect.isclass returns True, but in either case I think this specific example should be consistent i.e. either str is a Class in which case isOfType should return True, or it"s not and that first line should not compile.
The text was updated successfully, but these errors were encountered:
This code
compiles, but when run it prints False because of how isOfType is implemented on Python
I ran this issue when writing serialization logic where I needed to detect if a Dynamic is a Class object, where isOfType(x, Class) returned False where x is Python str. Ideally, isOfType could returns True for str and other python types that represent extern Haxe classes, or maybe just return if python_lib_Inspect.isclass returns True, but in either case I think this specific example should be consistent i.e. either str is a Class in which case isOfType should return True, or it"s not and that first line should not compile.
The text was updated successfully, but these errors were encountered: