-
Notifications
You must be signed in to change notification settings - Fork 154
Closed
Shopify/rbi-central
#290Labels
good-first-issueGood for newcomersGood for newcomershelp-wantedWe support this change, and welcome community contributions for it.We support this change, and welcome community contributions for it.
Description
Calling #each on a PrivateAssociationRelation, PrivateCollectionProxy, etc. will give an untyped block argument. However, #each_with_index will give a typed argument. This is difficult to work around (adding a line of code with a T.cast for each time #each is used, is not a workaround at all).
These are classes which are also valid Enumerables, but the each method on these classes will use the untyped ActiveRecord::Delegation methods from the rbi/gems path, and not a path defined in rbi/dsl, or even sorbet's T::Enumerable class. This causes the block argument to be untyped, which causes a lot of missed type checking!!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good-first-issueGood for newcomersGood for newcomershelp-wantedWe support this change, and welcome community contributions for it.We support this change, and welcome community contributions for it.