summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-28 15:29:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-28 15:29:18 +0800
commit75b8b11130cb3baae68082eaa49ecef9a8570e3a (patch)
tree495771883c3077f3a9a309297ebbbc77e1ff546b /test
parent599b44716801aea385e5726a37c788cdf674f78a (diff)
downloadlua-language-server-75b8b11130cb3baae68082eaa49ecef9a8570e3a.zip
special treat `local x; x = function() end`
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index b5814e29..6d81e640 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3167,3 +3167,11 @@ TEST 'number' [[
local function f() end
local x, y, <?z?> = 1, 2, f()
]]
+
+TEST 'function' [[
+local f
+
+print(<?f?>)
+
+function f() end
+]]