Browse Source

[cs] Call Type.getInstanceFields if Reflect.fields called on @:nativeGen type

Cauê Waneck 10 năm trước cách đây
mục cha
commit
7b89f71b5b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      std/cs/_std/Reflect.hx

+ 1 - 1
std/cs/_std/Reflect.hx

@@ -124,7 +124,7 @@ import cs.internal.Function;
 		} else if (o is System.Type) {
 			return Type.getClassFields( (System.Type) o);
 		} else {
-			return new Array<object>();
+			return Type.getInstanceFields( (System.Type) o );
 		}
 	')
 	public static function fields( o : Dynamic ) : Array<String>