diff options
Diffstat (limited to 'test/type_inference')
-rw-r--r-- | test/type_inference/init.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 36bbaa83..6032cd0f 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -3936,3 +3936,14 @@ TEST 'number' [[ ---@type fun(x: number) local function f(<?x?>) end ]] + +TEST 'boolean' [[ +---@generic T: string | boolean | table +---@param x T +---@return T +local function f(x) + return x +end + +local <?x?> = f(true) +]] |