summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-05-12 17:08:45 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-05-12 17:08:45 +0800
commit813da76cc7f899d7a0eca5afb0f224cd64eaaab0 (patch)
tree573a58ab2552b5d89ca64b681c4f65373afe38e5 /test
parent9ca33e92200b9465ddf71f64edce61c2a1b6a2c2 (diff)
downloadlua-language-server-813da76cc7f899d7a0eca5afb0f224cd64eaaab0.zip
update infer
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index df8f4fe8..0a041433 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -153,14 +153,26 @@ _VERSION = 'Lua 5.4'
]]
TEST 'function' [[
+---@class stringlib
+local string
+
+string.sub = function () end
+
return ('x').<?sub?>
]]
TEST 'function' [[
+---@class stringlib
+local string
+
+string.sub = function () end
+
<?x?> = ('x').sub
]]
TEST 'function' [[
+_VERSION = 'Lua 5.4'
+
<?x?> = _VERSION.sub
]]