| Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| index 10680e7c2ec6dae3cba62a4b36c20e652414a225..7a27b1d398e436ca27dc88b2d924da81808c55bf 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| @@ -2441,7 +2441,9 @@ class ResolverVisitor extends MappingVisitor<Element> {
|
| // type literal.
|
| mapping.setType(node, compiler.typeClass.computeType(compiler));
|
| world.registerTypeLiteral(target, mapping);
|
| - analyzeConstant(node);
|
| +
|
| + // Don't try to make constants of calls to type literals.
|
| + analyzeConstant(node, isConst: !node.isCall);
|
| }
|
| }
|
|
|
| @@ -2892,11 +2894,10 @@ class ResolverVisitor extends MappingVisitor<Element> {
|
| return null;
|
| }
|
|
|
| - void analyzeConstant(Node node) {
|
| + void analyzeConstant(Node node, {bool isConst: true}) {
|
| addPostProcessAction(enclosingElement, () {
|
| - mapping.setConstant(node,
|
| - compiler.constantHandler.compileNodeWithDefinitions(
|
| - node, mapping, isConst: true));
|
| + compiler.constantHandler.compileNodeWithDefinitions(
|
| + node, mapping, isConst: isConst);
|
| });
|
| }
|
|
|
|
|