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

Unified Diff: pkg/analyzer/lib/src/dart/element/element.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/dart/constant/evaluation.dart ('k') | pkg/analyzer/lib/src/dart/element/type.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 567c6fed0ea3498eda30cdf405c122c53db98018..2175e9e3078502cbd5d5ee324ae8954da0cd61bc 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -166,11 +166,8 @@ class ClassElementImpl extends ElementImpl implements ClassElement {
List<ConstructorElement> get constructors {
if (!isMixinApplication) {
assert(_constructors != null);
- return _constructors == null
- ? ConstructorElement.EMPTY_LIST
- : _constructors;
+ return _constructors ?? ConstructorElement.EMPTY_LIST;
}
-
return _computeMixinAppConstructors();
}
« no previous file with comments | « pkg/analyzer/lib/src/dart/constant/evaluation.dart ('k') | pkg/analyzer/lib/src/dart/element/type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698