anchor.diff:  // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
   // for details. All rights reserved. Use of this source code is governed by a
   // BSD-style license that can be found in the LICENSE file.
  -
  -import 'dart:collection';
   
   import 'package:analyzer/dart/analysis/features.dart';
   import 'package:analyzer/dart/ast/ast.dart';
  
positive.code:       return _dynamicType;
      }
      return returnType.type;
    }
  
    DartType _findIteratedType(DartType type, DartType targetType) {
      // TODO(vsm): Use leafp's matchType here?
      // Set by _find if match is found
      DartType result;
      // Elements we've already visited on a given inheritance path.
      HashSet<ClassElement> visitedClasses;
  
      type = type.resolveToBound(_typeProvider.objectType);
  
      bool _find(InterfaceType type) {
        ClassElement element = type.element;
        if (type == _typeProvider.objectType || element == null) {
          return false;
        }
        if (element == targetType.element) {
          List<DartType> typeArguments = type.typeArguments;
          assert(typeArguments.length == 1);
          result = typeArguments[0];
          return true;
        }
        if (visitedClasses == null) {
          visitedClasses = new HashSet<ClassElement>();
        }
        // Already visited this class along this path
        if (!visitedClasses.add(element)) {
          return false;
        }
        try {
          return _find(type.superclass) ||
              type.interfaces.any(_find) ||
              type.mixins.any(_find);
        } finally {
          visitedClasses.remove(element);
        }
      }
  
      if (type is InterfaceType) {
        _find(type);
      }
      return result;
    }
  
    /**
  
negative.code:       }
        if (iterable != null) {
          LocalVariableElementImpl element = loopVariable.declaredElement;
  
          DartType iterableType = iterable.staticType;
          iterableType = iterableType.resolveToBound(_typeProvider.objectType);
  
          ClassElement iteratedElement = (awaitKeyword == null)
              ? _typeProvider.iterableType.element
              : _typeProvider.streamType.element;
  
          InterfaceType iteratedType = iterableType is InterfaceTypeImpl
              ? iterableType.asInstanceOf(iteratedElement)
              : null;
  
          if (element != null && iteratedType != null) {
            DartType elementType = iteratedType.typeArguments.single;
            element.type = elementType;
            loopVariable.identifier.staticType = elementType;
          }
        }
      }
  