瀏覽代碼

[php] A "fix" to make List compile in PHP.

Dan Korostelev 11 年之前
父節點
當前提交
3054433bc5
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      std/php/_std/List.hx

+ 6 - 1
std/php/_std/List.hx

@@ -97,7 +97,7 @@
 		return false;
 	}
 
-	public function iterator() : Iterator<T> {
+	public function iterator() : ListIterator<T> {
 		return untyped __call__("new _hx_list_iterator", this);
 	}
 
@@ -158,3 +158,8 @@
 		return iterator();
 	}
 }
+
+@:coreType private extern class ListIterator<T> {
+	function hasNext():Bool;
+	function next():T;
+}