瀏覽代碼

add test for List iterator inline (closes #3486)

Simon Krajewski 10 年之前
父節點
當前提交
b921f30a30
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      tests/optimization/src/TestJs.hx

+ 6 - 0
tests/optimization/src/TestJs.hx

@@ -12,4 +12,10 @@ class TestJs {
         //var x = true;
         //Std.string(x);
 	//}
+
+	@:js("var a = new List();var _g_head = a.h;var _g_val = null;while(_g_head != null) {var tmp;_g_val = _g_head[0];_g_head = _g_head[1];tmp = _g_val;tmp;}")
+	static function testListIteratorInline() {
+		var a = new List();
+		for (v in a) { }
+	}
 }