Browse Source

is Dynamic.

Nicolas Cannasse 19 năm trước cách đây
mục cha
commit
84ecd6afc1
3 tập tin đã thay đổi với 9 bổ sung2 xóa
  1. 2 0
      std/flash/Boot.hx
  2. 2 0
      std/js/Boot.hx
  3. 5 2
      std/neko/Boot.hx

+ 2 - 0
std/flash/Boot.hx

@@ -106,6 +106,8 @@ class Boot {
 				return (o == true || o == false);
 			case String:
 				return __typeof__(o) == "string";
+			case Dynamic:
+				return true;
 			default:
 				return false;
 			}

+ 2 - 0
std/js/Boot.hx

@@ -147,6 +147,8 @@ class Boot {
 				return (o === true || o === false);
 			case String:
 				return __js__("typeof(o)") == "string";
+			case Dynamic:
+				return true;
 			default:
 				return false;
 			}

+ 5 - 2
std/neko/Boot.hx

@@ -29,6 +29,8 @@ class Boot {
 
 	private static function __instanceof(o,cl) {
 		untyped {
+			if( cl == Dynamic )
+				return true;
 			switch __dollar__typeof(o) {
 			case __dollar__tint: return (cl == Int || cl == Float);
 			case __dollar__tfloat: return cl == Float;
@@ -64,8 +66,9 @@ class Boot {
 			Date = NekoDate__;
 			Int = __dollar__new(null);
 			Float = __dollar__new(null);
-			Bool.true = true;
-			Bool.false = false;
+			Bool = __dollar__new(null);
+			__dollar__objset(Bool,__dollar__hash("true".__s),true);
+			__dollar__objset(Bool,__dollar__hash("false".__s),false);
 		}
 	}