Skip to content

Commit

Permalink
Break down long safe navigation chain
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock committed Nov 4, 2024
1 parent 84599c7 commit 8040d05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rbi/rbs_printer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,10 @@ def parse_t_let(code)
return unless node.name == :let
return unless node.receiver&.slice =~ /^(::)?T$/

node.arguments&.arguments&.fetch(1, nil)&.slice
arguments = node.arguments&.arguments
return unless arguments

arguments.fetch(1, nil)&.slice
end
end

Expand Down

0 comments on commit 8040d05

Please sign in to comment.