summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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
]]