diff options
Diffstat (limited to '')
| -rw-r--r-- | spec/outputs/switch.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/outputs/switch.lua b/spec/outputs/switch.lua index c4cde26..4358027 100644 --- a/spec/outputs/switch.lua +++ b/spec/outputs/switch.lua | |||
| @@ -247,6 +247,34 @@ do | |||
| 247 | print(a, b) | 247 | print(a, b) |
| 248 | end | 248 | end |
| 249 | end | 249 | end |
| 250 | do | ||
| 251 | local _tab_0 = "table" == type(tb) | ||
| 252 | if _tab_0 then | ||
| 253 | local a = tb.a | ||
| 254 | local b = tb.b | ||
| 255 | if b == nil then | ||
| 256 | b = 2 | ||
| 257 | end | ||
| 258 | if a ~= nil then | ||
| 259 | print("partially matched", a, b) | ||
| 260 | end | ||
| 261 | end | ||
| 262 | end | ||
| 263 | do | ||
| 264 | local _tab_0 = "table" == type(tb) | ||
| 265 | local _match_0 = false | ||
| 266 | if _tab_0 then | ||
| 267 | local a = tb.a | ||
| 268 | local b = tb.b | ||
| 269 | if a ~= nil and b ~= nil then | ||
| 270 | _match_0 = true | ||
| 271 | print(a, b) | ||
| 272 | end | ||
| 273 | end | ||
| 274 | if not _match_0 then | ||
| 275 | print("not matched") | ||
| 276 | end | ||
| 277 | end | ||
| 250 | end | 278 | end |
| 251 | do | 279 | do |
| 252 | local tb = { | 280 | local tb = { |
