summaryrefslogtreecommitdiff
path: root/test/type_inference/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/type_inference/init.lua')
-rw-r--r--test/type_inference/init.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index ed29d3d1..9172ca92 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3407,12 +3407,12 @@ TEST '{ [string]: number, [true]: string, [1]: boolean, tag: integer }' [[
local <?t?>
]]
-TEST 'nil' [[
+TEST 'unknown' [[
local mt = {}
mt.<?x?> = nil
]]
-TEST 'nil' [[
+TEST 'unknown' [[
mt = {}
mt.<?x?> = nil
]]
@@ -4189,3 +4189,13 @@ X.Y = 1
print(X.<?Y?>)
]]
+
+TEST 'integer' [[
+local x = {}
+
+x.y = 1
+local y = x.y
+x.y = nil
+
+print(<?y?>)
+]]