-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infer lambda return types #7741
Conversation
We have a policy of testing changes to Sorbet against Stripe's codebase before Stripe employees can see the build results here: → https://go/builds/bui_PewZ5mTLBbaHfA |
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
We have a policy of testing changes to Sorbet against Stripe's codebase before Stripe employees can see the build results here: → https://go/builds/bui_QNI1teTRhqvEFS |
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
We have a policy of testing changes to Sorbet against Stripe's codebase before Stripe employees can see the build results here: → https://go/builds/bui_QNIsi6nOzz6NRr |
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
We have a policy of testing changes to Sorbet against Stripe's codebase before Stripe employees can see the build results here: → https://go/builds/bui_QNIzBxeyA7Zv1r |
Sometimes it's useful to be able to use the arity of the block to guess an overload. This isn't perfect for all the reasons that overload checking isn't perfect, but there are some places where this is useful, especially in abstractions that check the proc's arity when deciding how to call the block. This is also a pre-requisite for doing something like #7741, which is a partial fix for #3914 / #4149, where we infer the types of `Kernel#lambda` blocks by codegenerating overloaded signatures.
We have a policy of testing changes to Sorbet against Stripe's codebase before Stripe employees can see the build results here: → https://go/builds/bui_QNJO1spvdG0G3M |
Closing in favor of #8011 |
Motivation
Partial fix for #3914
Partial fix for #4149
Test plan