Composed target-typed inference for switch expression and deconstruction #2898
Unanswered
huoyaoyuan
asked this question in
General
Replies: 2 comments
-
This is a part of #1394. Per #1394 (comment) it includes switch expressions as well. |
Beta Was this translation helpful? Give feedback.
0 replies
-
/cc @jcouv |
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.
-
Currently, this code compiles:
This code also compiles:
However, when combing switch expression and tuple together, this code cannot compile:
The compiler cannot infer type of lambda.
I'm not sure whether this belongs to target-typed expressions or common types. Maybe related to #2823.
Beta Was this translation helpful? Give feedback.
All reactions