Răsfoiți Sursa

[python] fixes #10440 (#10441)

Co-authored-by: Clément Charmet <[email protected]>
Aleksandr Kuzmenko 4 ani în urmă
părinte
comite
012aabe537
2 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 1 0
      extra/CHANGES.txt
  2. 1 1
      std/python/Boot.hx

+ 1 - 0
extra/CHANGES.txt

@@ -26,6 +26,7 @@
 	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)
 	jvm : fixed `Reflect.compare()` for different number types (#10350)
+	python : fixed exceptions on tracing some native values (#10440)
 
 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 {
-		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)