Better return type inference for proc and lambda values #4149
Labels
enhancement
New feature or surprising current feature
hard
Daunting task, even for Sorbet team members
Milestone
Input
→ View on sorbet.run
Observed output
Expected behavior
It's very unexpected that
Proc.new
returnsT.untyped
It's somewhat unexpected that the inferred return types are
T.untyped
It's actually expected that the arguments don't have an inferred type. Sorbet makes no effort to infer arguments (this is true for methods too). We might want to expose a way to annotate argument types for proc/lambda values, but that is out of scope for this issue.
The text was updated successfully, but these errors were encountered: