Inconsistent type assignment with different pattern matching syntax for nested object · Issue #8912 · sorbet/sorbet · GitHub
More Web Proxy on the site http://driver.im/
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
In the above example, I would have expected both calls to T.reveal_type(value) to result in T.untyped However what we see instead is that when using the combination of a value pattern + an array pattern, the value gets type NilClass. When we use a nested array pattern the value is assigned T.untyped
In both cases value should get assigned the type T.untyped
The text was updated successfully, but these errors were encountered:
Input
→ View on sorbet.run
Observed output
Expected behavior
In the above example, I would have expected both calls to
T.reveal_type(value)
to result inT.untyped
However what we see instead is that when using the combination of a value pattern + an array pattern, the value gets typeNilClass
. When we use a nested array pattern the value is assignedT.untyped
In both cases value should get assigned the type
T.untyped
The text was updated successfully, but these errors were encountered: