Chromium Code Reviews| 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 b0c750267c7e3cb0fce9e5557088d6de2625e94b..428a0420b07835d27f5a08cc2cc0a663d291340e 100644 |
| --- a/pkg/compiler/lib/src/compile_time_constants.dart |
| +++ b/pkg/compiler/lib/src/compile_time_constants.dart |
| @@ -779,7 +779,7 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> { |
| Node node, |
| CallStructure callStructure, |
| Link<Node> arguments, |
| - FunctionElement target, |
| + ConstructorElement target, |
| {AstConstant compileArgument(Node node)}) { |
| assert(invariant(node, target.isImplementation)); |
| @@ -790,7 +790,7 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> { |
| } |
| target.computeType(compiler); |
|
Anders Johnsen
2015/06/26 12:14:18
Take out function signature here
FunctionSignat
Johnni Winther
2015/06/26 12:50:23
Done.
|
| - if (!callStructure.signatureApplies(target)) { |
| + if (!callStructure.signatureApplies(target.functionSignature)) { |
| String name = Elements.constructorNameForDiagnostics( |
| target.enclosingClass.name, target.name); |
| compiler.reportError( |
| @@ -1028,8 +1028,10 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> { |
| "effective target: $constructor")); |
| return new ErroneousAstConstant(context, node); |
| } |
| - assert(invariant(node, callStructure.signatureApplies(constructor) || |
| - compiler.compilationFailed, |
| + assert(invariant( |
| + node, |
| + callStructure.signatureApplies(constructor.functionSignature) || |
| + compiler.compilationFailed, |
| message: "Call structure $callStructure does not apply to constructor " |
| "$constructor.")); |