2
0
Эх сурвалжийг харах

[python] fixes #10440 (#10441)

Co-authored-by: Clément Charmet <[email protected]>
Aleksandr Kuzmenko 4 жил өмнө
parent
commit
012aabe537

+ 1 - 0
extra/CHANGES.txt

@@ -26,6 +26,7 @@
 	eval : fixed signature of `eval.luv.Tcp.noDelay` method
 	eval : fixed signature of `eval.luv.Tcp.noDelay` method
 	lua : fixed `string.length` when `string` has type of a type parameter constrained to `String` (#10343)
 	lua : fixed `string.length` when `string` has type of a type parameter constrained to `String` (#10343)
 	jvm : fixed `Reflect.compare()` for different number types (#10350)
 	jvm : fixed `Reflect.compare()` for different number types (#10350)
+	python : fixed exceptions on tracing some native values (#10440)
 
 
 2021-07-01 4.2.3:
 2021-07-01 4.2.3:
 
 

+ 1 - 1
std/python/Boot.hx

@@ -223,7 +223,7 @@ class Boot {
 	}
 	}
 
 
 	static inline function isMetaType(v:Dynamic, t:Dynamic):Bool {
 	static inline function isMetaType(v:Dynamic, t:Dynamic):Bool {
-		return python.Syntax.binop(v, "==", t);
+		return Syntax.binop(Syntax.binop(Syntax.call(UBuiltins.type, [v]), "==", UBuiltins.type), "and", Syntax.binop(v, "==", t));
 	}
 	}
 
 
 	@:analyzer(no_local_dce)
 	@:analyzer(no_local_dce)