You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It has been requested that we permit a switch expression to be used as a statement expression. In order to make this work, we'd
Permit its type to be void.
Permit a switch expression to be used as a statement expression if all of the switch arm expressions are statement expressions.
Adjust type inference so that void is more specific than any other type, so it can be inferred as the result type. Resolution 2018-10-10: Yes! This requires a more precise spec, and it needs to handle a?.M() where M() returns an unconstrained T.
This might not be implemented for C# 8, but it would be good if it were.
The text was updated successfully, but these errors were encountered:
@alrz Probably yes, but I would not write any IDE code depending on this getting into C# 8 until it is in the language. It may be some time, or it may not make it into C# 8.
From dotnet/csharplang#1054
This might not be implemented for C# 8, but it would be good if it were.
The text was updated successfully, but these errors were encountered: