Chromium Code Reviews| Index: dart/pkg/compiler/lib/src/compile_time_constants.dart |
| diff --git a/dart/pkg/compiler/lib/src/compile_time_constants.dart b/dart/pkg/compiler/lib/src/compile_time_constants.dart |
| index 24bacbee599ac77e42007a69215e351278bfa496..271ff8da1f47b25e9845f9f29f518e3dbfed3d47 100644 |
| --- a/dart/pkg/compiler/lib/src/compile_time_constants.dart |
| +++ b/dart/pkg/compiler/lib/src/compile_time_constants.dart |
| @@ -954,6 +954,7 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator { |
| * parameters (like [:this.x:]), also updates the [fieldValues] map. |
| */ |
| void assignArgumentsToParameters(List<AstConstant> arguments) { |
| + if (constructor.isErroneous) return; |
|
Johnni Winther
2015/01/15 09:31:48
Shouldn't we generate an ErroneousConstantExpressi
ahe
2015/01/15 12:07:21
I'll look at that in a follow up.
|
| // Assign arguments to parameters. |
| FunctionSignature signature = constructor.functionSignature; |
| int index = 0; |
| @@ -1065,6 +1066,7 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator { |
| * native JavaScript constructor. |
| */ |
| void evaluateConstructorFieldValues(List<AstConstant> arguments) { |
| + if (constructor.isErroneous) return; |
| compiler.withCurrentElement(constructor, () { |
| assignArgumentsToParameters(arguments); |
| evaluateConstructorInitializers(); |