| 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 7b0494365797ef2bd23e32e0e1b8c4fad197657e..a1048438ff4a8be257113c3149e1f8d0580f669d 100644
|
| --- a/pkg/compiler/lib/src/compile_time_constants.dart
|
| +++ b/pkg/compiler/lib/src/compile_time_constants.dart
|
| @@ -643,20 +643,14 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
|
| FunctionElement target,
|
| {AstConstant compileArgument(Node node)}) {
|
| assert(invariant(node, target.isImplementation));
|
| - List<AstConstant> compiledArguments = <AstConstant>[];
|
|
|
| AstConstant compileDefaultValue(VariableElement element) {
|
| ConstantExpression constant = handler.compileConstant(element);
|
| return new AstConstant.fromDefaultValue(element, constant);
|
| }
|
| target.computeSignature(compiler);
|
| - bool succeeded = selector.addArgumentsToList(arguments,
|
| - compiledArguments,
|
| - target,
|
| - compileArgument,
|
| - compileDefaultValue,
|
| - compiler.world);
|
| - if (!succeeded) {
|
| +
|
| + if (!selector.applies(target, compiler.world)) {
|
| String name = Elements.constructorNameForDiagnostics(
|
| target.enclosingClass.name, target.name);
|
| compiler.reportFatalError(
|
| @@ -664,7 +658,10 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
|
| MessageKind.INVALID_CONSTRUCTOR_ARGUMENTS,
|
| {'constructorName': name});
|
| }
|
| - return compiledArguments;
|
| + return selector.makeArgumentsList2(arguments,
|
| + target,
|
| + compileArgument,
|
| + compileDefaultValue);
|
| }
|
|
|
| AstConstant visitNewExpression(NewExpression node) {
|
|
|