浏览代码

AS3 target Compile error with missing iterators. (#6187)

* Update WeakMap.hx

Error when targeting as3. Generates NativePropertyIterator.as and NativeValueIterator.as but __foreach__ __forin__ missing.  Better to not generate at all, since those impl are not used.

* Update ObjectMap.hx

Error when targeting as3. Generates NativePropertyIterator.as and NativeValueIterator.as but __foreach__ __forin__ missing.  Better to not generate at all, since those impl are not used.
Prarrot 8 年之前
父节点
当前提交
5c9c8f7bf8
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 2 1
      std/flash/_std/haxe/ds/ObjectMap.hx
  2. 2 1
      std/flash/_std/haxe/ds/WeakMap.hx

+ 2 - 1
std/flash/_std/haxe/ds/ObjectMap.hx

@@ -81,7 +81,7 @@ class ObjectMap<K:{},V> extends flash.utils.Dictionary implements haxe.Constrain
 		return s + "}";
 		return s + "}";
 	}
 	}
 }
 }
-
+#if !as3
 private class NativePropertyIterator {
 private class NativePropertyIterator {
 	var collection:Dynamic;
 	var collection:Dynamic;
 	var index:Int = 0;
 	var index:Int = 0;
@@ -139,3 +139,4 @@ private class NativeValueIterator {
 		return result;
 		return result;
 	}
 	}
 }
 }
+#end

+ 2 - 1
std/flash/_std/haxe/ds/WeakMap.hx

@@ -81,7 +81,7 @@ class WeakMap<K:{},V> extends flash.utils.Dictionary implements haxe.Constraints
 		return s + "}";
 		return s + "}";
 	}
 	}
 }
 }
-
+#if !as3
 private class NativePropertyIterator {
 private class NativePropertyIterator {
 	var collection:Dynamic;
 	var collection:Dynamic;
 	var index:Int = 0;
 	var index:Int = 0;
@@ -139,3 +139,4 @@ private class NativeValueIterator {
 		return result;
 		return result;
 	}
 	}
 }
 }
+#end