summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/src/core/diagnostics.lua3
-rw-r--r--server/test/diagnostics/init.lua8
2 files changed, 11 insertions, 0 deletions
diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua
index a8d38448..41a64da7 100644
--- a/server/src/core/diagnostics.lua
+++ b/server/src/core/diagnostics.lua
@@ -134,6 +134,9 @@ local function searchRedefinition(results, uri, callback)
then
goto NEXT_VAR
end
+ if var.hide then
+ goto NEXT_VAR
+ end
local shadow = var.shadow
if not shadow then
goto NEXT_VAR
diff --git a/server/test/diagnostics/init.lua b/server/test/diagnostics/init.lua
index 9d9c7424..5fb34908 100644
--- a/server/test/diagnostics/init.lua
+++ b/server/test/diagnostics/init.lua
@@ -142,3 +142,11 @@ return [[
]]
]=]
+
+TEST [[
+local mt, x
+function mt:m()
+ function x:m()
+ end
+end
+]]