Skip to content

Commit

Permalink
Add argument to satisfy typechecker on which signature to use
Browse files Browse the repository at this point in the history
This gets rid of a typecheck error on the solargraph codebase--the RBS
for the method called has two signatures, and without the additional
argument in the call neither signature is satisified.

It works in practice because the single implementation already
defaults this 'version' argument to nil.
  • Loading branch information
apiology committed Feb 22, 2025
1 parent ab6ea7d commit 1231f3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/solargraph/rbs_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def repository
# @return [Boolean] true if adding the library succeeded
def add_library loader, library
@resolved = if loader.has_library?(library: library, version: nil)
loader.add library: library
loader.add library: library, version: nil
Solargraph.logger.info "#{short_name} successfully loaded library #{library}"
true
else
Expand Down

0 comments on commit 1231f3c

Please sign in to comment.