summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/core/diagnostics/deprecated.lua3
-rw-r--r--script/meta/bee/filesystem.lua2
-rw-r--r--test/catch.lua4
-rw-r--r--test/highlight/init.lua1
4 files changed, 10 insertions, 0 deletions
diff --git a/script/core/diagnostics/deprecated.lua b/script/core/diagnostics/deprecated.lua
index 85ae2d19..6492bc53 100644
--- a/script/core/diagnostics/deprecated.lua
+++ b/script/core/diagnostics/deprecated.lua
@@ -45,6 +45,9 @@ return function (uri, callback)
local versions
if deprecated.type == 'doc.version' then
local validVersions = vm.getValidVersions(deprecated)
+ if not validVersions then
+ return
+ end
versions = {}
for version, valid in pairs(validVersions) do
if valid then
diff --git a/script/meta/bee/filesystem.lua b/script/meta/bee/filesystem.lua
index 9523103e..1f62e78c 100644
--- a/script/meta/bee/filesystem.lua
+++ b/script/meta/bee/filesystem.lua
@@ -1,3 +1,5 @@
+---@meta
+
---@class fs.path
---@operator div: fs.path
local fsPath = {}
diff --git a/test/catch.lua b/test/catch.lua
index 01aac665..b66d3e63 100644
--- a/test/catch.lua
+++ b/test/catch.lua
@@ -1,5 +1,7 @@
local m = require 'lpeglabel'
+---@class catched
+---@operator add: catched
local mt = {}
local function catchedTable()
@@ -35,6 +37,8 @@ end
---@param script string
---@param seps string
+---@return string
+---@return table<string, catched>
return function (script, seps)
local tokens = parseTokens(script, seps)
local newBuf = {}
diff --git a/test/highlight/init.lua b/test/highlight/init.lua
index 399012a8..1bd6cf35 100644
--- a/test/highlight/init.lua
+++ b/test/highlight/init.lua
@@ -26,6 +26,7 @@ function TEST(script)
local start, finish = enter[1], enter[2]
local pos = (start + finish) // 2
local positions = core(TESTURI, pos)
+ assert(positions)
local results = {}
for _, position in ipairs(positions) do
results[#results+1] = { position.start, position.finish }