diff options
Diffstat (limited to '')
-rw-r--r-- | spec/inputs/cond.yue | 16 | ||||
-rw-r--r-- | spec/outputs/cond.lua | 30 |
2 files changed, 46 insertions, 0 deletions
diff --git a/spec/inputs/cond.yue b/spec/inputs/cond.yue index 3dee99b..d33eec4 100644 --- a/spec/inputs/cond.yue +++ b/spec/inputs/cond.yue | |||
@@ -182,7 +182,23 @@ m = if 1 | |||
182 | 182 | ||
183 | else 6 | 183 | else 6 |
184 | 184 | ||
185 | do | ||
186 | a | ||
187 | :b | ||
188 | return if a | ||
189 | :b | ||
190 | else if c | ||
191 | d: e | ||
192 | else | ||
193 | f: 123 | ||
185 | 194 | ||
195 | do | ||
196 | c | ||
197 | d: e | ||
198 | if a | ||
199 | :b = tb | ||
200 | elseif c | ||
201 | d: e = tb | ||
186 | 202 | ||
187 | nil | 203 | nil |
188 | 204 | ||
diff --git a/spec/outputs/cond.lua b/spec/outputs/cond.lua index 5efa237..8f69e97 100644 --- a/spec/outputs/cond.lua +++ b/spec/outputs/cond.lua | |||
@@ -269,4 +269,34 @@ if 1 then | |||
269 | else | 269 | else |
270 | m = 6 | 270 | m = 6 |
271 | end | 271 | end |
272 | do | ||
273 | a({ | ||
274 | b = b | ||
275 | }) | ||
276 | if a then | ||
277 | return { | ||
278 | b = b | ||
279 | } | ||
280 | else | ||
281 | if c then | ||
282 | return { | ||
283 | d = e | ||
284 | } | ||
285 | else | ||
286 | return { | ||
287 | f = 123 | ||
288 | } | ||
289 | end | ||
290 | end | ||
291 | end | ||
292 | do | ||
293 | c({ | ||
294 | d = e | ||
295 | }) | ||
296 | if a then | ||
297 | b = tb.b | ||
298 | elseif c then | ||
299 | local e = tb.d | ||
300 | end | ||
301 | end | ||
272 | return nil | 302 | return nil |