| 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 4c02eca9b8998a1f1ee40a51c97d0244820ecee6..7f8fe79a6d11c4efa8f5d72d6f49e697d26b5b13 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| @@ -26,6 +26,14 @@ abstract class TreeElements {
|
| Selector setMoveNextSelector(ForIn node, Selector selector);
|
| Selector setCurrentSelector(ForIn node, Selector selector);
|
|
|
| + /**
|
| + * Returns [:true:] if [node] is a type literal.
|
| + *
|
| + * Resolution marks this by setting the type on the node to be the
|
| + * [:Type:] type.
|
| + */
|
| + bool isTypeLiteral(Send node);
|
| +
|
| /// Register additional dependencies required by [currentElement].
|
| /// For example, elements that are used by a backend.
|
| void registerDependency(Element element);
|
| @@ -132,6 +140,10 @@ class TreeElementMapping implements TreeElements {
|
| return selectors[node.inToken];
|
| }
|
|
|
| + bool isTypeLiteral(Send node) {
|
| + return getType(node) != null;
|
| + }
|
| +
|
| void registerDependency(Element element) {
|
| otherDependencies.add(element.implementation);
|
| }
|
| @@ -2310,7 +2322,7 @@ class ResolverVisitor extends MappingVisitor<Element> {
|
| // Set the type of the node to [Type] to mark this send as a
|
| // type variable expression.
|
| mapping.setType(node, compiler.typeClass.computeType(compiler));
|
| - world.registerInstantiatedClass(compiler.typeClass, mapping);
|
| + world.registerTypeLiteral(target, mapping);
|
| } else if (target.impliesType() && !sendIsMemberAccess) {
|
| // Set the type of the node to [Type] to mark this send as a
|
| // type literal.
|
| @@ -2474,8 +2486,10 @@ class ResolverVisitor extends MappingVisitor<Element> {
|
| }
|
| if (identical(source, '++')) {
|
| registerBinaryOperator(const SourceString('+'));
|
| + world.registerInstantiatedClass(compiler.intClass, mapping);
|
| } else if (identical(source, '--')) {
|
| registerBinaryOperator(const SourceString('-'));
|
| + world.registerInstantiatedClass(compiler.intClass, mapping);
|
| } else if (source.endsWith('=')) {
|
| registerBinaryOperator(Elements.mapToUserOperator(operatorName));
|
| }
|
|
|