From c6535538f8717a8f6134020a5bee65341cf8280f Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 28 Sep 2026 14:19:42 +0100 Subject: fix(lua): enable param-type-mismatch diagnostic Problem: Argument type mismatches are excluded from EmmyLua checks. Solution: Correct runtime annotations and calls, document local checker workarounds, and enable the diagnostic. AI-assisted --- runtime/lua/vim/loader.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim/loader.lua') diff --git a/runtime/lua/vim/loader.lua b/runtime/lua/vim/loader.lua index 1426294d9c..9123a68a77 100644 --- a/runtime/lua/vim/loader.lua +++ b/runtime/lua/vim/loader.lua @@ -259,7 +259,7 @@ end --- @return_overload function chunk --- @return_overload nil, string error_message local function loadfile_cached(filename, mode, env) - local modpath = normalize(filename) + local modpath = normalize(assert(filename)) local stat = fs_stat_cached(modpath) local cname = cache_filename(modpath) if stat then @@ -517,7 +517,7 @@ function M._inspect(opts) local function ms(nsec) return math.floor(nsec / 1e6 * 1000 + 0.5) / 1000 .. 'ms' end - local chunks = {} --- @type string[][] + local chunks = {} --- @type [string, string?][] for name, stat in vim.spairs(stats) do vim.list_extend(chunks, { { '\n' .. name .. '\n', 'Title' }, -- cgit