Fix switch expression example in CHANGELOG.

Fix #52338.

Change-Id: Ia7ebaaa202003090894bb2c9e7daea0a1694bae5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302447
Reviewed-by: Michael Thomsen <mit@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
This commit is contained in:
Robert Nystrom 2023-05-10 18:26:19 +00:00 committed by Commit Queue
parent a3195ce5f1
commit 9cd43f7d7d

View file

@ -132,9 +132,9 @@ constraint][language version] lower bound to 3.0 or greater (`sdk: '^3.0.0'`).
String lastName(Amigo amigo) =>
switch (amigo) {
case Lucky _ => 'Day';
case Ned _ => 'Nederlander';
}
Lucky _ => 'Day',
Ned _ => 'Nederlander',
};
```
In this last example, the compiler reports an error that the switch doesn't