diff --git a/lib/solargraph/type_checker.rb b/lib/solargraph/type_checker.rb index b4406a5f7..1bcaaef89 100644 --- a/lib/solargraph/type_checker.rb +++ b/lib/solargraph/type_checker.rb @@ -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