summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 6032cd0f..83f948cb 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3947,3 +3947,18 @@ end
local <?x?> = f(true)
]]
+
+TEST 'boolean' [[
+---@enum A
+local e = {
+ x = 1,
+ y = 2,
+}
+
+---@param p A
+---@overload fun(P: A.x): boolean
+---@overload fun(p: A.y): number
+local function f(p) end
+
+local <?r?> = f(e.x)
+]]