mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 09:01:42 +00:00
5b64d1233b
Make expect use `Never` to signal non-completion instead of depending on `meta`. Change-Id: Ibb4230e6b0cfbf995ad91a31c6620525cf6a8918 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194244 Reviewed-by: Lasse R.H. Nielsen <lrn@google.com> Reviewed-by: Erik Ernst <eernst@google.com> Reviewed-by: Nate Bosch <nbosch@google.com> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
14 lines
471 B
Dart
14 lines
471 B
Dart
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
void main() {
|
|
var map = <String, dynamic>{"a": null};
|
|
var castMap = map.cast<String, Object>();
|
|
// Should return `null`, not throw.
|
|
Expect.isNull(castMap.remove("b"));
|
|
Expect.isNull(castMap.remove("a"));
|
|
}
|