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
When a tuple is used as the expression for a switch statement (or expression), the tuple doesn't need parentheses. For example:
voidM(boola,boolb){switch(a,b)// This is the tuple (a,b), but the parentheses are for the switch expression, not the tuple.{case(true,true):break;case(true,false):break;case(false,true):break;case(false,false):break;}}
The text was updated successfully, but these errors were encountered:
BillWagner
changed the title
7,0
7.0 Tuple parentheses optional in switch expression and statement
May 11, 2022
gafter
changed the title
7.0 Tuple parentheses optional in switch expression and statement
8.0 Tuple parentheses optional in switch expression and statement
May 13, 2022
When a tuple is used as the expression for a switch statement (or expression), the tuple doesn't need parentheses. For example:
The text was updated successfully, but these errors were encountered: