summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/hover/init.lua8
-rw-r--r--test/type_inference/init.lua8
2 files changed, 12 insertions, 4 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua
index a09f8583..893d8698 100644
--- a/test/hover/init.lua
+++ b/test/hover/init.lua
@@ -697,8 +697,8 @@ end
]]
[[
function f()
- -> nil
- 2. nil
+ -> any
+ 2. any
]]
TEST [[
@@ -708,7 +708,7 @@ end
local <?x?> = f()
]]
[[
-local x: nil
+local x: any
]]
TEST [[
@@ -719,7 +719,7 @@ end
]]
[[
function f()
- -> integer|nil
+ -> integer
]]
TEST [[
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index d3ff258c..ac300fcb 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -233,6 +233,14 @@ end
<?y?> = x()
]]
+TEST 'any' [[
+local function x()
+ return nil
+ return f()
+end
+<?y?> = x()
+]]
+
TEST 'integer' [[
local function x()
return 1