Pārlūkot izejas kodu

add test for List iterator inline (closes #3486)

Simon Krajewski 10 gadi atpakaļ
vecāks
revīzija
b921f30a30
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      tests/optimization/src/TestJs.hx

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

@@ -12,4 +12,10 @@ class TestJs {
         //var x = true;
         //var x = true;
         //Std.string(x);
         //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) { }
+	}
 }
 }