From fe317e2bdd9cb60b3c7cd347e21ce65cf90396e7 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 16 May 2024 17:25:37 +0800 Subject: fix ambiguous issue in try-catch syntax. --- spec/outputs/unicode/try_catch.lua | 39 +++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'spec/outputs/unicode') 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 end, 1, 2, 3) _u6210_u529f, _u7ed3_u679c = pcall(_u51fd_u6570, 1, 2, 3) end -pcall(_u8868["函数"]) -pcall(_u8868["函数"]) -pcall(_u8868["函数"]) -pcall((_u8868["函数"])) -pcall(((function() - local _base_0 = _u8868 - local _fn_0 = _base_0["函数"] - return _fn_0 and function(...) - return _fn_0(_base_0, ...) - end -end)()), 1, 2, 3) -pcall(_u8868["函数"], 1) -pcall(_u8868["函数"], 1) +pcall(function() + return _u8868["函数"] +end) +pcall(function() + return _u8868["函数"]() +end) +pcall(function() + return _u8868["函数"]() +end) +pcall(function() + return _u8868["函数"]() +end) +pcall(function() + local _call_0 = _u8868 + return _call_0["函数"](_call_0, 1, 2, 3) +end) +pcall(function() + return _u8868["函数"](1) +end) +pcall(function() + return _u8868["函数"](1) +end) if (xpcall(_u51fd_u6570, function(_u9519_u8bef) return _u6253_u5370(_u9519_u8bef) end, 1)) then @@ -55,7 +64,7 @@ do end end do -pcall(_u51fd_u6570, 1, 2, 3) -pcall(_u51fd_u6570, 1, 2, 3) + pcall(_u51fd_u6570, 1, 2, 3) + pcall(_u51fd_u6570, 1, 2, 3) end return nil -- cgit v1.2.3-55-g6feb