diff options
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/hover/init.lua | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua index 8187f7d3..9e1d6ada 100644 --- a/server/test/hover/init.lua +++ b/server/test/hover/init.lua @@ -117,7 +117,7 @@ mt.__name = 'class' local <?obj?> = setmetatable({}, mt) ]] -"local obj: *class" +"local obj: *class {}" TEST [[ local mt = {} @@ -126,7 +126,12 @@ mt.__index = mt local <?obj?> = setmetatable({}, mt) ]] -"local obj: *class" +[[ +local obj: *class { + __index: table, + name: string = "class", +} +]] TEST [[ local mt = {} @@ -135,7 +140,12 @@ mt.__index = mt local <?obj?> = setmetatable({}, mt) ]] -"local obj: *class" +[[ +local obj: *class { + TYPE: string = "class", + __index: table, +} +]] TEST [[ local mt = {} @@ -144,7 +154,12 @@ mt.__index = mt local <?obj?> = setmetatable({}, mt) ]] -"local obj: *class" +[[ +local obj: *class { + Class: string = "class", + __index: table, +} +]] TEST[[ local fs = require 'bee.filesystem' @@ -351,3 +366,24 @@ end [[ function mt:test(a: any, b: any) ]] + +TEST[[ +local mt = {} +mt.__index = mt +mt.__name = 'obj' + +function mt:remove() +end + +local <?self?> = setmetatable({ + id = 1, +}, mt) +]] +[[ +local self: *obj { + __index: table, + __name: string = "obj", + id: number = 1, + remove: function, +} +]] |