| 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 "
|
|
|