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

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 2696073003: Check for no constructors before iterating (issue 28703) (Closed)
Patch Set: revert to original Created 3 years, 10 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') | no next file » | 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 ecd8ec6ac82916ea699315c9d50859eab7b2b451..ef4007bc742e042b75f2856461a55dcce8ab5390 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -2006,6 +2006,10 @@ class ConstructorElementImpl extends ExecutableElementImpl
UnlinkedExecutable serializedExecutable, ClassElementImpl enclosingClass)
: super.forSerialized(serializedExecutable, enclosingClass);
+ /**
+ * Return the constant initializers for this element, which will be empty if
+ * there are no initializers, or `null` if there was an error in the source.
+ */
List<ConstructorInitializer> get constantInitializers {
if (serializedExecutable != null && _constantInitializers == null) {
_constantInitializers ??= serializedExecutable.constantInitializers
« no previous file with comments | « pkg/analyzer/lib/src/dart/constant/evaluation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698