Skip to content

Commit

Permalink
Merge pull request #2054 from tk0miya/bugs/UntypedFunction.map_type_name
Browse files Browse the repository at this point in the history
Fix UntypedFunction does not provide #map_type_name
  • Loading branch information
soutaro authored Oct 8, 2024
2 parents fc3c07f + 00c7c52 commit a877d7d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/rbs/types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,12 @@ def map_type(&block)
end
end

def map_type_name(&block)
UntypedFunction.new(
return_type: return_type.map_type_name(&block)
)
end

def each_type(&block)
if block
yield return_type
Expand Down

0 comments on commit a877d7d

Please sign in to comment.