Verified Commit 18e30d47 authored by Vladimir Sedach's avatar Vladimir Sedach
Browse files

Added unit test for 83e1cda7 fix for LOOP collect redundant initialization

parent 161d6160
......@@ -867,6 +867,18 @@ for (var _js1 = 0; _js1 < _js2; _js1 += 1) {
return collect3;
})();")
(test-ps-js loop-collect-twice
(loop collect x collect (1+ x))
"(function () {
var collect1 = [];
while (true) {
collect1.push(x);
collect1.push(x + 1);
};
__PS_MV_REG = [];
return collect1;
})();")
(test-ps-js loop-append
(loop :for a :in b :append a)
"(function () {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment