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

Unified Diff: pkg/analyzer/lib/src/dart/constant/evaluation.dart

Issue 1841523003: Fix a corner case of constant evaluation cycle detection. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/constant/evaluation.dart
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index 5484bba6e86bb6c6ceaf426ce08e6fcb9f1d46b6..2bf03d57e82f09e7c506ebebc1c581a3deae0c99 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -295,16 +295,17 @@ class ConstantEvaluationEngine {
// any other constants. So we don't need to report any dependencies.
return;
}
- bool superInvocationFound = false;
+ bool defaultSuperInvocationNeeded = true;
List<ConstructorInitializer> initializers =
constant.constantInitializers;
for (ConstructorInitializer initializer in initializers) {
- if (initializer is SuperConstructorInvocation) {
- superInvocationFound = true;
+ if (initializer is SuperConstructorInvocation ||
+ initializer is RedirectingConstructorInvocation) {
+ defaultSuperInvocationNeeded = false;
}
initializer.accept(referenceFinder);
}
- if (!superInvocationFound) {
+ if (defaultSuperInvocationNeeded) {
// No explicit superconstructor invocation found, so we need to
// manually insert a reference to the implicit superconstructor.
InterfaceType superclass =
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698