Skip to content

Commit

Permalink
Fix an upcoming recommended lint (#1680)
Browse files Browse the repository at this point in the history
https://dart-lang.github.io/linter/lints/null_check_on_nullable_type_parameter.html

Eagerly fixing before we start picking up the new lint package.
  • Loading branch information
natebosch committed Mar 25, 2022
1 parent 3f8983c commit 8e8150a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkgs/test_core/lib/src/util/io.dart
Expand Up @@ -160,7 +160,8 @@ void warn(String message, {bool? color, bool print = false}) {
///
/// This is necessary for ensuring that our port binding isn't flaky for
/// applications that don't print out the bound port.
Future<T> getUnusedPort<T>(FutureOr<T> Function(int port) tryPort) async {
Future<T> getUnusedPort<T extends Object>(
FutureOr<T> Function(int port) tryPort) async {
T? value;
await Future.doWhile(() async {
value = await tryPort(await getUnsafeUnusedPort());
Expand Down

0 comments on commit 8e8150a

Please sign in to comment.