summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/vm/tracer.lua2
-rw-r--r--test/type_inference/init.lua9
2 files changed, 11 insertions, 0 deletions
diff --git a/script/vm/tracer.lua b/script/vm/tracer.lua
index 7999eaaa..3f2380bd 100644
--- a/script/vm/tracer.lua
+++ b/script/vm/tracer.lua
@@ -595,6 +595,8 @@ local lookIntoChild = util.switch()
end
end
if not handler then
+ tracer:lookIntoChild(action[1], topNode)
+ tracer:lookIntoChild(action[2], topNode)
return topNode, outNode
end
if tracer.getMap[handler] then
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 7cfc7fe9..c8619d27 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -4166,3 +4166,12 @@ X = Y
print(<?X?>)
]]
+
+TEST 'number' [[
+---@type number
+local t
+
+if xxx == <?t?> then
+ print(t)
+end
+]]