Type inference for lambda parameters should be able to take the body of the lambda into account #17772
civp
started this conversation in
Feature Requests
Replies: 1 comment
-
This is the sort of things that #9076 aimed to fix but it's far from trivial. As things stand this is an accepted limitation of type inference so I'll move this to the feature requests repo. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Compiler version
3.1.1
Minimized code
Output
Expectation
The result of type inference should be
(x: B)
becaueB
is a subclass ofA
.The program should compile.
Beta Was this translation helpful? Give feedback.
All reactions