Skip to content

Commit ed3809f

Browse files
committed
Fix ancestral recursion
1 parent 8e17184 commit ed3809f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/solargraph/api_map/constants.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def complex_resolve name, gates, internal
119119
resolved = simple_resolve(name, gate, internal)
120120
return [resolved, gates[(idx + 1)..]] if resolved
121121
store.get_ancestor_references(gate).each do |ref|
122-
mixin = resolve(ref.name, ref.reference_gates - [gate])
122+
return ref.name if ref.name.end_with?("::#{name}")
123+
mixin = resolve(ref.name, ref.reference_gates - gates)
123124
next unless mixin
124125
resolved = simple_resolve(name, mixin, internal)
125126
return [resolved, gates[(idx + 1)..]] if resolved

0 commit comments

Comments
 (0)