From 7e778b31476831864dff995ae3ae4e5f223c5726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 28 Jun 2022 19:09:39 +0800 Subject: new diag `return-type-mismatch` --- script/parser/guide.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'script/parser/guide.lua') diff --git a/script/parser/guide.lua b/script/parser/guide.lua index 83c84964..8de08ef9 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -1090,12 +1090,12 @@ end ---@param a table ---@param b table ---@return string|false mode ----@return table pathA? ----@return table pathB? +---@return table? pathA +---@return table? pathB function m.getPath(a, b, sameFunction) --- 首先测试双方在同一个函数内 if sameFunction and m.getParentFunction(a) ~= m.getParentFunction(b) then - return false, nil, nil + return false end local mode local objA @@ -1139,7 +1139,7 @@ function m.getPath(a, b, sameFunction) end end if not start then - return false, nil, nil + return false end -- pathA: { 1, 2, 3} -- pathB: {5, 6, 2, 3} -- cgit v1.2.3