diff options
Diffstat (limited to 'server/test/crossfile/hover.lua')
-rw-r--r-- | server/test/crossfile/hover.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/server/test/crossfile/hover.lua b/server/test/crossfile/hover.lua index 8bcc9411..51ac85bd 100644 --- a/server/test/crossfile/hover.lua +++ b/server/test/crossfile/hover.lua @@ -135,3 +135,31 @@ TEST { label = 'function (a: any, b: any)', } } + +TEST { + { + path = 'a.lua', + content = [[ + local mt = {} + mt.__index = mt + + function mt:add(a, b) + end + + return function () + return setmetatable({}, mt) + end + ]], + }, + { + path = 'b.lua', + content = [[ + local m = require 'a' + local obj = m() + obj:<?add?>() + ]] + }, + hover = { + label = 'function mt:add(a: any, b: any)' + }, +} |