浏览代码

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

Cauê Waneck 10 年之前
父节点
当前提交
7b89f71b5b
共有 1 个文件被更改,包括 1 次插入1 次删除
  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) {
 		} else if (o is System.Type) {
 			return Type.getClassFields( (System.Type) o);
 			return Type.getClassFields( (System.Type) o);
 		} else {
 		} else {
-			return new Array<object>();
+			return Type.getInstanceFields( (System.Type) o );
 		}
 		}
 	')
 	')
 	public static function fields( o : Dynamic ) : Array<String>
 	public static function fields( o : Dynamic ) : Array<String>