diff options
-rw-r--r-- | script/vm/node.lua | 3 | ||||
-rw-r--r-- | test/diagnostics/common.lua | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/script/vm/node.lua b/script/vm/node.lua index 16b5a8d8..6f0554f0 100644 --- a/script/vm/node.lua +++ b/script/vm/node.lua @@ -136,7 +136,8 @@ function mt:isNullable() for _, c in ipairs(self) do if c.type == 'nil' or (c.type == 'global' and c.cate == 'type' and c.name == 'nil') - or (c.type == 'global' and c.cate == 'type' and c.name == 'any') then + or (c.type == 'global' and c.cate == 'type' and c.name == 'any') + or (c.type == 'global' and c.cate == 'type' and c.name == '...') then return true end end diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua index 5e65b410..de2481a6 100644 --- a/test/diagnostics/common.lua +++ b/test/diagnostics/common.lua @@ -1727,6 +1727,13 @@ function F() end ]] +TEST [[ +---@return ... +function F() + return +end +]] + do return end TEST [[ ---@return number |