summaryrefslogtreecommitdiff
path: root/test-beta/type_inference/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-08-18 16:48:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-08-18 16:48:10 +0800
commit8f2ce1024c5ea43e11137a398171c01642b2ea1a (patch)
treeefa2d98b2a354c6b34a2271676d23bb8c3411a6c /test-beta/type_inference/init.lua
parent332ba28abb7dfe6f45242c978376b3b88c720284 (diff)
downloadlua-language-server-8f2ce1024c5ea43e11137a398171c01642b2ea1a.zip
更新测试
Diffstat (limited to 'test-beta/type_inference/init.lua')
-rw-r--r--test-beta/type_inference/init.lua48
1 files changed, 24 insertions, 24 deletions
diff --git a/test-beta/type_inference/init.lua b/test-beta/type_inference/init.lua
index 5a532b27..151faa89 100644
--- a/test-beta/type_inference/init.lua
+++ b/test-beta/type_inference/init.lua
@@ -225,35 +225,35 @@ TEST 'function' [[
]]
-- 不根据对方函数内的使用情况来推测
---TEST 'number' [[
---local function x(a)
--- _ = a + 1
---end
---local b
---x(<?b?>)
---]]
+TEST 'any' [[
+local function x(a)
+ _ = a + 1
+end
+local b
+x(<?b?>)
+]]
---TEST 'number' [[
---local function x(a, ...)
--- local _, <?b?>, _ = ...
---end
---x(nil, 'xx', 1, true)
---]]
+TEST 'any' [[
+local function x(a, ...)
+ local _, <?b?>, _ = ...
+end
+x(nil, 'xx', 1, true)
+]]
-- 引用不跨越参数
---TEST 'number' [[
---local function x(a, ...)
--- return true, 'ss', ...
---end
---local _, _, _, <?b?>, _ = x(nil, true, 1, 'yy')
---]]
+TEST 'any' [[
+local function x(a, ...)
+ return true, 'ss', ...
+end
+local _, _, _, <?b?>, _ = x(nil, true, 1, 'yy')
+]]
--- 暂不支持这些特殊情况,之后用其他语法定义
+-- TODO 暂不支持这些特殊情况,之后用其他语法定义
--TEST 'integer' [[
--for <?i?> in ipairs(t) do
--end
--]]
---
---TEST 'any' [[
---local <?x?> = next()
---]]
+
+TEST 'any' [[
+local <?x?> = next()
+]]