-
Notifications
You must be signed in to change notification settings - Fork 85
Clarifying the README about find, first and last #18
Comments
Sorbet only supports overloading for stdlib but intentionally limiting to not be used in other definitions. Since we want to type Here is a full context from @DarkDimius
https://sorbet-ruby.slack.com/archives/CHN2L03NH/p1558029143153100 |
Clarify multiple signature support in Sorbet see #18
I added a note to the readme in #20. Thanks for the great question! I'm going to close the issue but please feel free to reply if you have more question. |
Clarify multiple signature support in Sorbet see #18
Thanks for the quote, that explains some of it. |
Currently, the README says:
But it seems to work for Enumerable#first for instance, and the definition in Sorbet uses multiple signatures for a function: https://github.com/sorbet/sorbet/blob/119e937e9e3b03ec27308cd8874f482791d15864/rbi/core/enumerable.rbi#L167-L174
Probably that was in an earlier version of Sorbet and now it could work out of the box?
The text was updated successfully, but these errors were encountered: