Skip to content

Commit

Permalink
Refactored lvar assignment.
Browse files Browse the repository at this point in the history
  • Loading branch information
castwide committed Apr 26, 2020
1 parent 9be3eb2 commit b2ae954
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/solargraph/type_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ def argument_problems_for chain, api_map, block_pin, locals, location
if pins.first.is_a?(Pin::BaseMethod)
# @type [Pin::BaseMethod]
pin = pins.first
if base.links.last.is_a?(Solargraph::Source::Chain::ZSuper)
ap = arity_problems_for(pin, fake_args_for(block_pin), location)
ap = if base.links.last.is_a?(Solargraph::Source::Chain::ZSuper)
arity_problems_for(pin, fake_args_for(block_pin), location)
else
ap = arity_problems_for(pin, base.links.last.arguments, location)
arity_problems_for(pin, base.links.last.arguments, location)
end
unless ap.empty?
result.concat ap
Expand Down

0 comments on commit b2ae954

Please sign in to comment.