Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: pkg/analyzer/lib/src/task/strong/info.dart

Issue 1933763002: Use null-aware operators to clean up the code (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Additional clean-up Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/strong/checker.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/strong/info.dart
diff --git a/pkg/analyzer/lib/src/task/strong/info.dart b/pkg/analyzer/lib/src/task/strong/info.dart
index 41703e12a13f9ba325536ab51ca59d45ff62c30c..39885cde81b47963bf1998efb2e7fa89710e752d 100644
--- a/pkg/analyzer/lib/src/task/strong/info.dart
+++ b/pkg/analyzer/lib/src/task/strong/info.dart
@@ -212,10 +212,7 @@ class DynamicInvoke extends CoercionInfo {
toErrorCode() => new HintCode(name, message);
/// Whether this [node] is the target of a dynamic operation.
- static bool get(AstNode node) {
- var value = node.getProperty(_propertyName);
- return value != null ? value : false;
- }
+ static bool get(AstNode node) => node.getProperty(_propertyName) ?? false;
/// Sets whether this node is the target of a dynamic operation.
static bool set(AstNode node, bool value) {
« no previous file with comments | « pkg/analyzer/lib/src/task/strong/checker.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698