Browse Source

fixed (enum is Array).

Nicolas Cannasse 19 years ago
parent
commit
2c836d7163
2 changed files with 8 additions and 2 deletions
  1. 4 1
      std/flash/Boot.hx
  2. 4 1
      std/js/Boot.hx

+ 4 - 1
std/flash/Boot.hx

@@ -123,8 +123,11 @@ class Boot {
 
 
 	private static function __instanceof(o,cl) {
 	private static function __instanceof(o,cl) {
 		untyped {
 		untyped {
-			if( __instanceof__(o,cl) )
+			if( __instanceof__(o,cl) ) {
+				if( cl == Array )
+					return ( o.__enum__ == null );
 				return true;
 				return true;
+			}
 			#if flash6
 			#if flash6
 			if( __interfLoop(o.__class__,cl) )
 			if( __interfLoop(o.__class__,cl) )
 				return true;
 				return true;

+ 4 - 1
std/js/Boot.hx

@@ -151,8 +151,11 @@ class Boot {
 	private static function __instanceof(o,cl) {
 	private static function __instanceof(o,cl) {
 		untyped {
 		untyped {
 			try {
 			try {
-				if( __js__("o instanceof cl") )
+				if( __js__("o instanceof cl") ) {
+					if( cl == Array )
+						return (o.__enum__ == null);
 					return true;
 					return true;
+				}
 				if( __interfLoop(o.__class__,cl) )
 				if( __interfLoop(o.__class__,cl) )
 					return true;
 					return true;
 			} catch( e : Dynamic ) {
 			} catch( e : Dynamic ) {