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

Unified Diff: pkg/compiler/lib/src/compile_time_constants.dart

Issue 1127623002: Fix dart2dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compile_time_constants.dart
diff --git a/pkg/compiler/lib/src/compile_time_constants.dart b/pkg/compiler/lib/src/compile_time_constants.dart
index ae441b7af95774eff64b90ee6dac6e1931fb131c..83e1307720d8f4ea8416654919f5c46637c97429 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -919,9 +919,14 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
CallStructure callStructure,
List<AstConstant> concreteArguments,
List<AstConstant> normalizedArguments) {
- assert(invariant(node, !target.isRedirectingFactory,
- message: "makeConstructedConstant can only be called with the "
- "effective target: $constructor"));
+ if (target.isRedirectingFactory) {
+ // This happens is case of cyclic redirection.
+ assert(invariant(node, compiler.compilationFailed,
+ message: "makeConstructedConstant can only be called with the "
+ "effective target: $constructor"));
+ return new AstConstant(
+ context, node, new ErroneousConstantExpression());
+ }
assert(invariant(node, callStructure.signatureApplies(constructor) ||
compiler.compilationFailed,
message: "Call structure $callStructure does not apply to constructor "
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698