7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/holistic/ruby/type_inference/solve.rb', line 7
def call(application:, reference:)
referenced_scope =
solve_scope_reference(application:, reference:) ||
solve_method_call(application:, reference:)
if referenced_scope
reference.relation(:referenced_scope).add!(referenced_scope)
reference.find_clue(Clue::ReferenceToSuperclass)&.then do |reference_to_superclass_clue|
referenced_scope.relation(:descendants).add!(reference_to_superclass_clue.subclass_scope)
end
end
end
|