summaryrefslogtreecommitdiff
path: root/script/parser/guide.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/parser/guide.lua')
-rw-r--r--script/parser/guide.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index b07a301e..35658c94 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -1767,18 +1767,18 @@ function m.searchSameMethodCrossSelf(ref, mark)
end
function m.searchSameMethod(ref, mark)
- if mark['method'] then
- return nil
- end
local nxt = ref.next
if not nxt then
return nil
end
- if nxt.type == 'setmethod' then
- mark['method'] = true
- return ref
+ if nxt.type ~= 'setmethod' then
+ return nil
+ end
+ if mark[ref] then
+ return nil
end
- return nil
+ mark[ref] = true
+ return ref
end
function m.searchSameFieldsCrossMethod(status, ref, start, queue)
@@ -1795,6 +1795,7 @@ function m.searchSameFieldsCrossMethod(status, ref, start, queue)
local methodStatus = m.status(status)
m.searchRefs(methodStatus, method, 'ref')
for _, md in ipairs(methodStatus.results) do
+ mark[md] = true
queue[#queue+1] = {
obj = md,
start = start,