Skip to content

Commit

Permalink
Filter findDefinitions, to avoid using the wrong one
Browse files Browse the repository at this point in the history
Tested by giving exportTerm0 and exportTerm1 difference filenames,
resulting in different locations and breakage.

[Cherry-picked 0ee03ef]
  • Loading branch information
dwijnand authored and WojciechMazur committed Jun 28, 2024
1 parent fe6b1b4 commit f8f98cc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class PcDefinitionProvider(
val isLocal = sym.source == pos.source
if isLocal then
val defs =
Interactive.findDefinitions(List(sym), driver, false, false)
Interactive.findDefinitions(List(sym), driver, false, false).filter(_.source == sym.source)
defs.headOption match
case Some(srcTree) =>
val pos = srcTree.namePos
Expand Down

0 comments on commit f8f98cc

Please sign in to comment.