commit | b197d009e62158194e5c4bd6ccf44e410c28fba1 | [log] [tgz] |
---|---|---|
author | pq <pquitslund@google.com> | Thu May 19 21:13:51 2022 +0000 |
committer | Commit Bot <commit-bot@chromium.org> | Thu May 19 21:13:51 2022 +0000 |
tree | 9ecda520a357fa5853f520ff29b1cd0afc4c27b7 | |
parent | 2bb220a95d39f9a76dc02c2c495e605e89a9f64d [diff] |
cleanup unnecessary nullaware op on an extension on a nullable ``` extension<T> on T? { R? mapOrNull<R>(R Function(T) mapper) { final self = this; return self != null ? mapper(self) : null; } } ``` Change-Id: I9276257423df85aabc3f30e6f5ea817fad92ce6a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245440 Commit-Queue: Phil Quitslund <pquitslund@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analyzer/lib/src/summary2/macro_declarations.dart b/pkg/analyzer/lib/src/summary2/macro_declarations.dart index 569b47c..2a097a8 100644 --- a/pkg/analyzer/lib/src/summary2/macro_declarations.dart +++ b/pkg/analyzer/lib/src/summary2/macro_declarations.dart
@@ -261,7 +261,7 @@ return macro.TypeParameterDeclarationImpl( id: macro.RemoteInstance.uniqueId, identifier: _identifier(node.name), - bound: node.bound?.mapOrNull(_typeAnnotation), + bound: node.bound.mapOrNull(_typeAnnotation), ); }