diff options
| author | Li Jin <dragon-fly@qq.com> | 2024-05-16 17:25:37 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2024-05-16 17:25:37 +0800 |
| commit | fe317e2bdd9cb60b3c7cd347e21ce65cf90396e7 (patch) | |
| tree | ed0b010b08f91fdb2bc9a4df18e8d638d47b1c7a /spec/outputs/unicode | |
| parent | c857b3b83c7485693bfcc2b65e9e6e95107396f4 (diff) | |
| download | yuescript-fe317e2bdd9cb60b3c7cd347e21ce65cf90396e7.tar.gz yuescript-fe317e2bdd9cb60b3c7cd347e21ce65cf90396e7.tar.bz2 yuescript-fe317e2bdd9cb60b3c7cd347e21ce65cf90396e7.zip | |
fix ambiguous issue in try-catch syntax.v0.23.4
Diffstat (limited to 'spec/outputs/unicode')
| -rw-r--r-- | spec/outputs/unicode/try_catch.lua | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/spec/outputs/unicode/try_catch.lua b/spec/outputs/unicode/try_catch.lua index fde63d6..7d95f9b 100644 --- a/spec/outputs/unicode/try_catch.lua +++ b/spec/outputs/unicode/try_catch.lua | |||
| @@ -14,19 +14,28 @@ do | |||
| 14 | end, 1, 2, 3) | 14 | end, 1, 2, 3) |
| 15 | _u6210_u529f, _u7ed3_u679c = pcall(_u51fd_u6570, 1, 2, 3) | 15 | _u6210_u529f, _u7ed3_u679c = pcall(_u51fd_u6570, 1, 2, 3) |
| 16 | end | 16 | end |
| 17 | pcall(_u8868["函数"]) | 17 | pcall(function() |
| 18 | pcall(_u8868["函数"]) | 18 | return _u8868["函数"] |
| 19 | pcall(_u8868["函数"]) | 19 | end) |
| 20 | pcall((_u8868["函数"])) | 20 | pcall(function() |
| 21 | pcall(((function() | 21 | return _u8868["函数"]() |
| 22 | local _base_0 = _u8868 | 22 | end) |
| 23 | local _fn_0 = _base_0["函数"] | 23 | pcall(function() |
| 24 | return _fn_0 and function(...) | 24 | return _u8868["函数"]() |
| 25 | return _fn_0(_base_0, ...) | 25 | end) |
| 26 | end | 26 | pcall(function() |
| 27 | end)()), 1, 2, 3) | 27 | return _u8868["函数"]() |
| 28 | pcall(_u8868["函数"], 1) | 28 | end) |
| 29 | pcall(_u8868["函数"], 1) | 29 | pcall(function() |
| 30 | local _call_0 = _u8868 | ||
| 31 | return _call_0["函数"](_call_0, 1, 2, 3) | ||
| 32 | end) | ||
| 33 | pcall(function() | ||
| 34 | return _u8868["函数"](1) | ||
| 35 | end) | ||
| 36 | pcall(function() | ||
| 37 | return _u8868["函数"](1) | ||
| 38 | end) | ||
| 30 | if (xpcall(_u51fd_u6570, function(_u9519_u8bef) | 39 | if (xpcall(_u51fd_u6570, function(_u9519_u8bef) |
| 31 | return _u6253_u5370(_u9519_u8bef) | 40 | return _u6253_u5370(_u9519_u8bef) |
| 32 | end, 1)) then | 41 | end, 1)) then |
| @@ -55,7 +64,7 @@ do | |||
| 55 | end | 64 | end |
| 56 | end | 65 | end |
| 57 | do | 66 | do |
| 58 | pcall(_u51fd_u6570, 1, 2, 3) | 67 | pcall(_u51fd_u6570, 1, 2, 3) |
| 59 | pcall(_u51fd_u6570, 1, 2, 3) | 68 | pcall(_u51fd_u6570, 1, 2, 3) |
| 60 | end | 69 | end |
| 61 | return nil | 70 | return nil |
