mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
[tests] Update expectation to TypeError
TypeError is now expected in the place of NullThrownError which is being removed in Dart 3.0. Change-Id: Ibb7188d993216067650d4b994a303f2bcd1d2298 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275742 Reviewed-by: Leaf Petersen <leafp@google.com> Commit-Queue: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
parent
f30e5de558
commit
faf8027465
|
@ -26,11 +26,12 @@ class ExceptionTest {
|
|||
|
||||
bool correctCatch = false;
|
||||
try {
|
||||
// This throws NullThrownError
|
||||
// This used to throw a NullThrownError but that error was removed in
|
||||
// Dart 3.0. Now it throws a TypeError.
|
||||
throw null;
|
||||
} on String catch (s) {
|
||||
correctCatch = false;
|
||||
} on NullThrownError catch (e) {
|
||||
} on TypeError catch (e) {
|
||||
correctCatch = true;
|
||||
} catch (x) {
|
||||
correctCatch = false;
|
||||
|
|
Loading…
Reference in a new issue