From 694068b6dc92269b0221d671bf15b5965ccddff7 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 23 Mar 2023 15:52:16 +0800 Subject: fixing Linux build. --- spec/outputs/destructure.lua | 44 +++++++++++++++--------------- spec/outputs/switch.lua | 64 ++++++++++++++++++++++---------------------- 2 files changed, 54 insertions(+), 54 deletions(-) (limited to 'spec') diff --git a/spec/outputs/destructure.lua b/spec/outputs/destructure.lua index cb0eb3f..25e0529 100644 --- a/spec/outputs/destructure.lua +++ b/spec/outputs/destructure.lua @@ -478,8 +478,8 @@ do end do local _exp_0 = tb - local _tab_0 = type(_exp_0) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(_exp_0) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 if _tab_0 then local name, meta_field do @@ -537,17 +537,17 @@ do end do local _exp_0 = tb - local _tab_0 = type(_exp_0) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(_exp_0) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 if _tab_0 then do local _obj_0 = _exp_0.a - local _type_0 = type(_obj_0) - if "table" == _type_0 or "userdata" == _type_0 then + local _type_1 = type(_obj_0) + if "table" == _type_1 or "userdata" == _type_1 then do local _obj_1 = getmetatable(_obj_0) - local _type_1 = type(_obj_1) - if "table" == _type_1 or "userdata" == _type_1 then + local _type_2 = type(_obj_1) + if "table" == _type_2 or "userdata" == _type_2 then add = _obj_1.__add end end @@ -555,12 +555,12 @@ do end do local _obj_0 = _exp_0.b - local _type_0 = type(_obj_0) - if "table" == _type_0 or "userdata" == _type_0 then + local _type_1 = type(_obj_0) + if "table" == _type_1 or "userdata" == _type_1 then do local _obj_1 = getmetatable(_obj_0) - local _type_1 = type(_obj_1) - if "table" == _type_1 or "userdata" == _type_1 then + local _type_2 = type(_obj_1) + if "table" == _type_2 or "userdata" == _type_2 then field = _obj_1[fieldName] end end @@ -577,17 +577,17 @@ do end do local _exp_0 = tb - local _tab_0 = type(_exp_0) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(_exp_0) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 if _tab_0 then do local _obj_0 = _exp_0.c - local _type_0 = type(_obj_0) - if "table" == _type_0 or "userdata" == _type_0 then + local _type_1 = type(_obj_0) + if "table" == _type_1 or "userdata" == _type_1 then do local _obj_1 = getmetatable(_obj_0) - local _type_1 = type(_obj_1) - if "table" == _type_1 or "userdata" == _type_1 then + local _type_2 = type(_obj_1) + if "table" == _type_2 or "userdata" == _type_2 then meta_field = _obj_1["abc"] end end @@ -600,15 +600,15 @@ do local _obj_0 = getmetatable(_exp_0) do local _obj_1 = _obj_0[ [[any string]]] - local _type_0 = type(_obj_1) - if "table" == _type_0 or "userdata" == _type_0 then + local _type_1 = type(_obj_1) + if "table" == _type_1 or "userdata" == _type_1 then abc = _obj_1.d end end do local _obj_1 = _obj_0['str'] - local _type_0 = type(_obj_1) - if "table" == _type_0 or "userdata" == _type_0 then + local _type_1 = type(_obj_1) + if "table" == _type_1 or "userdata" == _type_1 then def = _obj_1.e end end diff --git a/spec/outputs/switch.lua b/spec/outputs/switch.lua index 3c48120..1ace1e3 100644 --- a/spec/outputs/switch.lua +++ b/spec/outputs/switch.lua @@ -107,43 +107,43 @@ do } } do - local _tab_0 = type(dict) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(dict) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 if _tab_0 then local first = dict[1] local one do local _obj_0 = dict[2] - local _type_0 = type(_obj_0) - if "table" == _type_0 or "userdata" == _type_0 then + local _type_1 = type(_obj_0) + if "table" == _type_1 or "userdata" == _type_1 then one = _obj_0[1] end end local two do local _obj_0 = dict[2] - local _type_0 = type(_obj_0) - if "table" == _type_0 or "userdata" == _type_0 then + local _type_1 = type(_obj_0) + if "table" == _type_1 or "userdata" == _type_1 then two = _obj_0[2] end end local three do local _obj_0 = dict[2] - local _type_0 = type(_obj_0) - if "table" == _type_0 or "userdata" == _type_0 then + local _type_1 = type(_obj_0) + if "table" == _type_1 or "userdata" == _type_1 then three = _obj_0[3] end end local c do local _obj_0 = dict.a - local _type_0 = type(_obj_0) - if "table" == _type_0 or "userdata" == _type_0 then + local _type_1 = type(_obj_0) + if "table" == _type_1 or "userdata" == _type_1 then do local _obj_1 = _obj_0.b - local _type_1 = type(_obj_1) - if "table" == _type_1 or "userdata" == _type_1 then + local _type_2 = type(_obj_1) + if "table" == _type_2 or "userdata" == _type_2 then c = _obj_1.c end end @@ -152,12 +152,12 @@ do local z do local _obj_0 = dict.x - local _type_0 = type(_obj_0) - if "table" == _type_0 or "userdata" == _type_0 then + local _type_1 = type(_obj_0) + if "table" == _type_1 or "userdata" == _type_1 then do local _obj_1 = _obj_0.y - local _type_1 = type(_obj_1) - if "table" == _type_1 or "userdata" == _type_1 then + local _type_2 = type(_obj_1) + if "table" == _type_2 or "userdata" == _type_2 then z = _obj_1.z end end @@ -184,8 +184,8 @@ do for _index_0 = 1, #items do local item = items[_index_0] do - local _tab_0 = type(item) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(item) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 local _match_0 = false if _tab_0 then local x = item.x @@ -243,8 +243,8 @@ end do local tb = { } do - local _tab_0 = type(tb) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(tb) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 if _tab_0 then local a = tb.a local b = tb.b @@ -258,8 +258,8 @@ do end end do - local _tab_0 = type(tb) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(tb) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 if _tab_0 then local a = tb.a local b = tb.b @@ -272,8 +272,8 @@ do end end do - local _tab_0 = type(tb) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(tb) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 local _match_0 = false if _tab_0 then local a = tb.a @@ -293,8 +293,8 @@ do x = "abc" } do - local _tab_0 = type(tb) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(tb) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 local _match_0 = false if _tab_0 then local x = tb.x @@ -321,8 +321,8 @@ do if 1 == _exp_0 then matched = "1" else - local _tab_0 = type(_exp_0) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(_exp_0) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 local _match_0 = false if _tab_0 then local x = _exp_0.x @@ -347,8 +347,8 @@ do return "invalid" else do - local _tab_0 = type(_exp_0) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(_exp_0) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 local _match_0 = false if _tab_0 then local a = _exp_0.a @@ -382,8 +382,8 @@ end do do local _exp_0 = y - local _tab_0 = type(_exp_0) - _tab_0 = "table" == _tab_0 or "userdata" == _tab_0 + local _type_0 = type(_exp_0) + local _tab_0 = "table" == _type_0 or "userdata" == _type_0 if _tab_0 then local mt = (function() local _obj_0 = _exp_0.x -- cgit v1.2.3-55-g6feb