From f1ec1ae321baf2842dbc0523f046045985906fa1 Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Wed, 27 Jul 2011 22:35:45 -0700 Subject: [PATCH] fix updated test --- tests/outputs/lists.lua | 53 +++++++++++++++++++++++++++++++++++++++++ todo | 7 ++++++ 2 files changed, 60 insertions(+) diff --git a/tests/outputs/lists.lua b/tests/outputs/lists.lua index dce68b5..23ce3aa 100644 --- a/tests/outputs/lists.lua +++ b/tests/outputs/lists.lua @@ -247,4 +247,57 @@ do local y = _item_0[_index_0] print(y) end +end +local f +f = function(...) + return #{ + ... + } +end +x = function(...) + return (function(...) + local _accum_0 = { } + do + local _item_0 = { + ... + } + for _index_0 = 1, #_item_0 do + local x = _item_0[_index_0] + if f(...) > 4 then + table.insert(_accum_0, x * x) + end + end + end + return _accum_0 + end)(...) +end +local normal +normal = function(hello) + return (function() + local _accum_0 = { } + for x in yeah do + table.insert(_accum_0, x) + end + return _accum_0 + end)() +end +local dont_bubble +dont_bubble = function() + return (function() + local _accum_0 = { } + for x in (function(...) + return print(...) + end)("hello") do + table.insert(_accum_0, x) + end + return _accum_0 + end)() +end +local test = x(1, 2, 3, 4, 5) +do + local _item_0 = test + for _index_0 = 1, #_item_0 do + local thing = _item_0[_index_0] + print(thing) + end end \ No newline at end of file diff --git a/todo b/todo index 05ff209..4156bb2 100644 --- a/todo +++ b/todo @@ -39,3 +39,10 @@ or * any/every keywords for comprehensions? + +... not working right + + +double_args = (...) -> + [x * 2 for x in *{...}] +