Browse Source

Fix comparing Closure logic.

muguangyi 10 năm trước cách đây
mục cha
commit
79550f3b4e
1 tập tin đã thay đổi với 9 bổ sung0 xóa
  1. 9 0
      std/cs/internal/Function.hx

+ 9 - 0
std/cs/internal/Function.hx

@@ -77,4 +77,13 @@ package cs.internal;
 	{
 	{
 		return Runtime.callField(obj, field, hash, dynArgs);
 		return Runtime.callField(obj, field, hash, dynArgs);
 	}
 	}
+	
+	public function Equals(obj:Dynamic):Bool
+	{
+		if (obj == null)
+			return false;
+		
+		Closure c = cast obj;
+		return (c.obj == this.obj && c.field == this.field);
+	}
 }
 }