@@ -16,201 +16,3 @@ function ____exports.__main(self)
1616end
1717return ____exports"
1818` ;
19-
20- exports [` vararg spread optimization With cast [5.0] 1` ] = `
21- "local ____exports = { }
22- function ____exports.__main(self)
23- local function pick(self, ...)
24- local args = arg
25- return args[2]
26- end
27- local function test(self, ...)
28- return pick(
29- nil,
30- unpack(arg)
31- )
32- end
33- return test(nil, \\ "a\\ ", \\ "b\\ ", \\ "c\\ ")
34- end
35- return ____exports"
36- ` ;
37-
38- exports [` vararg spread optimization basic use [5.0] 1` ] = `
39- "local ____exports = { }
40- function ____exports.__main(self)
41- local function pick(self, ...)
42- local args = arg
43- return args[2]
44- end
45- local function test(self, ...)
46- return pick(
47- nil,
48- unpack(arg)
49- )
50- end
51- return test(nil, \\ "a\\ ", \\ "b\\ ", \\ "c\\ ")
52- end
53- return ____exports"
54- ` ;
55-
56- exports [` vararg spread optimization block statement [5.0] 1` ] = `
57- "local ____exports = { }
58- function ____exports.__main(self)
59- local function pick(self, ...)
60- local args = arg
61- return args[2]
62- end
63- local function test(self, ...)
64- local result
65- do
66- result = pick(
67- nil,
68- unpack(arg)
69- )
70- end
71- return result
72- end
73- return test(nil, \\ "a\\ ", \\ "b\\ ", \\ "c\\ ")
74- end
75- return ____exports"
76- ` ;
77-
78- exports [` vararg spread optimization body-less arrow function [5.0] 1` ] = `
79- "local ____exports = { }
80- function ____exports.__main(self)
81- local function pick(self, ...)
82- local args = arg
83- return args[2]
84- end
85- local function test(____, ...)
86- return pick(
87- nil,
88- unpack(arg)
89- )
90- end
91- return test(nil, \\ "a\\ ", \\ "b\\ ", \\ "c\\ ")
92- end
93- return ____exports"
94- ` ;
95-
96- exports [` vararg spread optimization curry [5.0] 1` ] = `
97- "local ____exports = { }
98- function ____exports.__main(self)
99- local function test(self, fn, ...)
100- return fn(
101- nil,
102- unpack(arg)
103- )
104- end
105- return test(
106- nil,
107- function(____, arg) return arg end,
108- \\ "foobar\\ "
109- )
110- end
111- return ____exports"
112- ` ;
113-
114- exports [` vararg spread optimization curry with indirect type [5.0] 1` ] = `
115- "local ____exports = { }
116- function ____exports.__main(self)
117- local function test(self, obj, ...)
118- local fn = obj.fn
119- return fn(
120- nil,
121- unpack(arg)
122- )
123- end
124- return test(
125- nil,
126- { fn = function (____ , s ) return s end} ,
127- \\ "foobar\\ "
128- )
129- end
130- return ____exports"
131- ` ;
132-
133- exports [` vararg spread optimization finally clause [5.0] 1` ] = `
134- "local ____exports = { }
135- function ____exports.__main(self)
136- local function pick(self, ...)
137- local args = arg
138- return args[2]
139- end
140- local function test(self, ...)
141- do
142- pcall(function()
143- error(\\ "foobar\\ ", 0)
144- end)
145- do
146- return pick(
147- nil,
148- unpack(arg)
149- )
150- end
151- end
152- end
153- return test(nil, \\ "a\\ ", \\ "b\\ ", \\ "c\\ ")
154- end
155- return ____exports"
156- ` ;
157-
158- exports [` vararg spread optimization function type declared inside scope [5.0] 1` ] = `
159- "local ____exports = { }
160- function ____exports.__main(self)
161- local function test(self, ...)
162- local function fn(____, ...)
163- local args = arg
164- return args[1]
165- end
166- return fn(
167- nil,
168- unpack(arg)
169- )
170- end
171- test(nil, \\ "foobar\\ ")
172- end
173- return ____exports"
174- ` ;
175-
176- exports [` vararg spread optimization if statement [5.0] 1` ] = `
177- "local ____exports = { }
178- function ____exports.__main(self)
179- local function pick(self, ...)
180- local args = arg
181- return args[2]
182- end
183- local function test(self, ...)
184- if true then
185- return pick(
186- nil,
187- unpack(arg)
188- )
189- end
190- end
191- return test(nil, \\ "a\\ ", \\ "b\\ ", \\ "c\\ ")
192- end
193- return ____exports"
194- ` ;
195-
196- exports [` vararg spread optimization loop statement [5.0] 1` ] = `
197- "local ____exports = { }
198- function ____exports.__main(self)
199- local function pick(self, ...)
200- local args = arg
201- return args[2]
202- end
203- local function test(self, ...)
204- repeat
205- do
206- return pick(
207- nil,
208- unpack(arg)
209- )
210- end
211- until not false
212- end
213- return test(nil, \\ "a\\ ", \\ "b\\ ", \\ "c\\ ")
214- end
215- return ____exports"
216- ` ;
0 commit comments