Open
Description
When using switch with multiple case receivers, it's important to understand that it works differently than in control flow languages. For example:
switch {
['Alice', 'Bob'] -> upper
_ -> lower
}
Is not "if either Alice or Bob then do uppercase". It's a fan-in, which means Alice
and Bob
are concurrent to each other. Switch will select first value that will be sent as a case value, which is in this case random, because both values are message literals
Activity