Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/rbs/prototype/rbi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,10 @@ def parse_params(args_node, args, method_type, variables:, overloads:)
while kw
name, value = kw.children[0].children
if (type = vars[name])
if value
optional_keywords[name] = Types::Function::Param.new(type: type, name: name)
else
if value.nil? || value == :NODE_SPECIAL_REQUIRED_KEYWORD
required_keywords[name] = Types::Function::Param.new(type: type, name: name)
else
optional_keywords[name] = Types::Function::Param.new(type: type, name: name)
end
end

Expand Down
Loading