You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result of methods that include by in the name is a hash where:
Key: type m (be it a single value or an array of multiple)
Value: type n or T::Array[n] depending on things like if unique has been passed to cache_attribute.
So at present when the return type is T::Array[n], it would be expected that it is actually T::Hash[T.untyped, n] or T::Hash[T.untyped, T::Array[n]] based on how it was created.
The text was updated successfully, but these errors were encountered:
@KaanOzkan@Morriar So as not hold it up any further, I've marked two calls in the latest Core RBI update as T.unsafe, with smart TODOs pointing at this issue.
Description
After implementing the missing
fetch_multi_n_by_m
methods in #1758 I have found out that the method signature isn't always correct as shown in this example fromcache_attribute
: https://github.com/Shopify/identity_cache/blob/main/lib/identity_cache/cached/attribute.rb#L82-L101The result of methods that include
by
in the name is a hash where:m
(be it a single value or an array of multiple)n
orT::Array[n]
depending on things like ifunique
has been passed tocache_attribute
.So at present when the return type is
T::Array[n]
, it would be expected that it is actuallyT::Hash[T.untyped, n]
orT::Hash[T.untyped, T::Array[n]]
based on how it was created.The text was updated successfully, but these errors were encountered: