This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Type inference for lambda parameters should be able to take the body of the lambda into account #17771
Labels
stat:needs triage
Every issue needs to have an "area" and "itype" label
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.
The text was updated successfully, but these errors were encountered: