- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.1k
 
Closed
Labels
Milestone
Description
I propose that we support a switch expression as a statement expression when every arm's expression is also a statement expression. No common type among the arms is required when used as a statement expression.
void M(bool c, ref int x, ref string s)
{
    c switch { true => x = 1, false => s = null };
}Meeting notes
DavidArno, canton7, jnm2, ufcpp, orthoxerox and 89 moreKira-NT, rikimaru0345, omikhailov, TahirAhmadov, andrew-skybound and 2 morestakx, Kira-NT, DrLeh, tyger, Denis535 and 4 moreDavidArno, Mteheran, tannergooding, Unknown6656, Mrxx99 and 11 moreneon-sunset