فهرست منبع

Lua : fix Std.is for enum

Justin Donaldson 9 سال پیش
والد
کامیت
15c2292392
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      std/lua/Boot.hx

+ 3 - 1
std/lua/Boot.hx

@@ -107,7 +107,9 @@ class Boot {
 			case Dynamic:
 				return true;
 			default: {
-				if (   untyped __type__(o)  == "table"
+				if ( untyped o.__enum__ != null ){
+					return o.__enum__ == cl;
+				} else if (   untyped __type__(o)  == "table"
 					&& untyped __type__(cl) == "table"){
 					while (Lua.getmetatable(o) != null && Lua.getmetatable(o).__index != null){
 						if (Lua.getmetatable(o).__index == cl.prototype) return true;