diff options
author | Li Jin <dragon-fly@qq.com> | 2025-04-11 17:33:12 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2025-04-11 17:33:12 +0800 |
commit | e96308912e2e04535836a2c282b0a7300d2d81fd (patch) | |
tree | 9c6f55dbce6193dac6f78dad94f76ad1c0a6ef1a /spec/outputs/5.1 | |
parent | 9750786a5c03b5ce3ea22b240d1b3cd34990856b (diff) | |
download | yuescript-0.27.4.tar.gz yuescript-0.27.4.tar.bz2 yuescript-0.27.4.zip |
Fixing issue #206.v0.27.4
Diffstat (limited to '')
-rw-r--r-- | spec/outputs/5.1/attrib.lua | 18 | ||||
-rw-r--r-- | spec/outputs/5.1/try_catch.lua | 6 |
2 files changed, 14 insertions, 10 deletions
diff --git a/spec/outputs/5.1/attrib.lua b/spec/outputs/5.1/attrib.lua index a156e84..bda24bc 100644 --- a/spec/outputs/5.1/attrib.lua +++ b/spec/outputs/5.1/attrib.lua | |||
@@ -136,9 +136,11 @@ do | |||
136 | end | 136 | end |
137 | local b | 137 | local b |
138 | if not false then | 138 | if not false then |
139 | if x then | 139 | b = ((function() |
140 | b = 1 | 140 | if x then |
141 | end | 141 | return 1 |
142 | end | ||
143 | end)()) | ||
142 | end | 144 | end |
143 | local _close_0 | 145 | local _close_0 |
144 | if (function() | 146 | if (function() |
@@ -164,10 +166,12 @@ do | |||
164 | end)(pcall(function() | 166 | end)(pcall(function() |
165 | local c | 167 | local c |
166 | if true then | 168 | if true then |
167 | local _exp_0 = x | 169 | c = ((function() |
168 | if "abc" == _exp_0 then | 170 | local _exp_0 = x |
169 | c = 998 | 171 | if "abc" == _exp_0 then |
170 | end | 172 | return 998 |
173 | end | ||
174 | end)()) | ||
171 | end | 175 | end |
172 | local d | 176 | local d |
173 | if (function() | 177 | if (function() |
diff --git a/spec/outputs/5.1/try_catch.lua b/spec/outputs/5.1/try_catch.lua index d4c80c1..efd92c6 100644 --- a/spec/outputs/5.1/try_catch.lua +++ b/spec/outputs/5.1/try_catch.lua | |||
@@ -8,10 +8,10 @@ local _anon_func_2 = function(tb) | |||
8 | return tb.func() | 8 | return tb.func() |
9 | end | 9 | end |
10 | local _anon_func_3 = function(tb) | 10 | local _anon_func_3 = function(tb) |
11 | return tb.func() | 11 | return (tb.func()) |
12 | end | 12 | end |
13 | local _anon_func_4 = function(tb) | 13 | local _anon_func_4 = function(tb) |
14 | return tb:func(1, 2, 3) | 14 | return (tb:func(1, 2, 3)) |
15 | end | 15 | end |
16 | local _anon_func_5 = function(tb) | 16 | local _anon_func_5 = function(tb) |
17 | return tb.func(1) | 17 | return tb.func(1) |
@@ -64,7 +64,7 @@ f = function() | |||
64 | print("OK") | 64 | print("OK") |
65 | end | 65 | end |
66 | if xpcall(function() | 66 | if xpcall(function() |
67 | return func(1) | 67 | return (func(1)) |
68 | end, function(err) | 68 | end, function(err) |
69 | return print(err) | 69 | return print(err) |
70 | end) then | 70 | end) then |