@@ -1409,6 +1409,7 @@ let configure gen =
| TDynamic _, TEnum({ e_path = ([], "Bool") }, [])
| TDynamic _, TAbstract({ a_path = ([], "Bool") }, []) -> true
| _ -> false)
+ | "GetHashCode", TFun([],_) -> true
| _ -> false
in
@@ -119,4 +119,17 @@ private class Enum
return true;
}
+ public function GetHashCode():Int
+ {
+ var h = 19;
+ if (params != null) for (p in params)
+ h = h * 31;
+ if (p != null)
+ h += untyped p.GetHashCode();
+ }
+ h += index;
+ return h;
+
@@ -120,4 +120,17 @@ private class Enum
+ public function hashCode():Int
+ h += untyped p.hashCode();