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

[python] properly type Internal.fieldFields invocations (see #6147)

Dan Korostelev 8 жил өмнө
parent
commit
17beb301de

+ 2 - 3
std/python/Boot.hx

@@ -245,8 +245,7 @@ class Boot {
 		var a = [];
 		var a = [];
 		if (o != null) {
 		if (o != null) {
 			if (Internal.hasFields(o)) {
 			if (Internal.hasFields(o)) {
-				var fields:Array<String> = Internal.fieldFields(o);
-				return fields.copy();
+				return (Internal.fieldFields(o) : Array<String>).copy();
 			}
 			}
 			if (isAnonObject(o)) {
 			if (isAnonObject(o)) {
 
 
@@ -328,7 +327,7 @@ class Boot {
 
 
 
 
 	static function getInstanceFields( c : Class<Dynamic> ) : Array<String> {
 	static function getInstanceFields( c : Class<Dynamic> ) : Array<String> {
-		var f = if (Internal.hasFields(c)) Internal.fieldFields(c).copy() else [];
+		var f = if (Internal.hasFields(c)) (Internal.fieldFields(c) : Array<String>).copy() else [];
 		if (Internal.hasMethods(c))
 		if (Internal.hasMethods(c))
 			f = f.concat(Internal.fieldMethods(c));
 			f = f.concat(Internal.fieldMethods(c));