diff options
-rw-r--r-- | script-beta/parser/guide.lua | 4 | ||||
-rw-r--r-- | test-beta/definition/init.lua | 7 | ||||
-rw-r--r-- | test-beta/hover/init.lua | 16 |
3 files changed, 17 insertions, 10 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index 17a294ca..0c29c96a 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -1552,6 +1552,10 @@ function m.checkSameSimpleByDoc(status, obj, start, queue, mode) m.checkSameSimpleOfRefByDocSource(status, obj, start, queue, mode) end return true + elseif obj.type == 'doc.field' then + if mode ~= 'field' then + return m.checkSameSimpleByDoc(status, obj.extends, start, queue, mode) + end end end diff --git a/test-beta/definition/init.lua b/test-beta/definition/init.lua index e1459547..6e6d0a9a 100644 --- a/test-beta/definition/init.lua +++ b/test-beta/definition/init.lua @@ -1,5 +1,6 @@ -local core = require 'core.definition' +local core = require 'core.definition' local files = require 'files' +local vm = require 'vm' rawset(_G, 'TEST', true) @@ -46,7 +47,9 @@ function TEST(script) if results then local positions = {} for i, result in ipairs(results) do - positions[i] = { result.target.start, result.target.finish } + if not vm.isMetaFile(result.uri) then + positions[i] = { result.target.start, result.target.finish } + end end assert(founded(target, positions)) else diff --git a/test-beta/hover/init.lua b/test-beta/hover/init.lua index 55596074..b12a9206 100644 --- a/test-beta/hover/init.lua +++ b/test-beta/hover/init.lua @@ -536,9 +536,9 @@ global io: io { output: function, popen: function, read: function, - stderr: FILE*, - stdin: FILE*, - stdout: FILE*, + stderr: file, + stdin: file, + stdout: file, tmpfile: function, type: function, write: function, @@ -636,7 +636,7 @@ TEST[[ <?next?>() ]] [[ -function next(table: table [, index: any]) +function next(table: table, index: any?) -> key: any 2. value: any ]] @@ -775,7 +775,7 @@ local <?t?> = { ]] [[ local t: { - f: FILE*, + f: file, } ]] @@ -783,9 +783,9 @@ TEST [[ io.<?popen?>() ]] [[ -function io.popen(prog: string [, mode: string]) - -> FILE*|nil - 2.[error_message: string] +function io.popen(prog: string, mode: "r"|"w"?) + -> file? + 2. errmsg: string? ]] TEST [[ |