@@ -68,7 +68,7 @@
var a : Array<String> = __keys__(o);
var i = 0;
while( i < a.length ) {
- if( !a["hasOwnProperty"]["call"](o,a[i]) )
+ if( a[i] == "__id__" || !a["hasOwnProperty"]["call"](o,a[i]) )
a.splice(i,1);
else
++i;
@@ -59,7 +59,7 @@
if (o != null) untyped {
var hasOwnProperty = __js__('Object').prototype.hasOwnProperty;
__js__("for( var f in o ) {");
- if( hasOwnProperty.call(o, f) ) a.push(f);
+ if( f != "__id__" && hasOwnProperty.call(o, f) ) a.push(f);
__js__("}");
}
return a;
@@ -19,6 +19,12 @@ o.exists(k1) == true;
o.exists(k2) == true;
o.exists(k3) == true;
+// the __id__ field should not appear in Reflect.fields
+#if (js || flash8)
+var fields = Reflect.fields(k1);
+fields == ["i"];
+#end
+
// get
o.get(k3) == "7";
o.get(k2) == "8";