buzz
buzz copied to clipboard
Match statement
match (n) {
Locale.frFR,
Locale.frBE -> {
print("On parle français!");
return true;
},
Locale.en -> print("we speak english!"),
default -> print("Single statement is allowed"),
}
If evaluated expression is an EnumInstance we can detect missing cases.