Skip to content

Commit

Permalink
fix: correctly filter local defs from outgoing calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuisi committed Jan 10, 2024
1 parent 6fbcebe commit 59f4035
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Lean/Server/Watchdog.lean
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ def handleCallHierarchyOutgoingCalls (p : CallHierarchyOutgoingCallsParams)
let some parentDecl := usage.parentDecl?
| return false
return p.item.name.toName == parentDecl.name

let outgoingUsages := outgoingUsages.map (·.range)
if outgoingUsages.isEmpty then
return none
Expand All @@ -506,7 +507,7 @@ def handleCallHierarchyOutgoingCalls (p : CallHierarchyOutgoingCallsParams)
| return none

-- filter local defs from outgoing calls
if item.name == p.item.name.toName then
if item.name == p.item.name then
return none

return some ⟨item, outgoingUsages⟩
Expand Down

0 comments on commit 59f4035

Please sign in to comment.