diff options
Diffstat (limited to 'test/type_inference/init.lua')
-rw-r--r-- | test/type_inference/init.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 55b4f7af..8797cfdd 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -4294,6 +4294,21 @@ m.<?a?> ]] TEST 'integer' [[ +---@class metatable : table +---@field __index table + +---@param table table +---@param metatable? metatable +---@return table +function setmetatable(table, metatable) end + +local mt = {a = 1 } +local m = setmetatable({},{ __index = mt }) + +m.<?a?> +]] + +TEST 'integer' [[ local x = 1 repeat until <?x?> |