anchor.diff:      if (returnStatement.expression == null) {
         value = graph.addConstantNull(compiler);
       } else {
  -      assert(target is ir.FunctionNode);
  +      assert(_targetFunction != null && _targetFunction is ir.FunctionNode);
         returnStatement.expression.accept(this);
         value = typeBuilder.potentiallyCheckOrTrustType(pop(),
  -          astAdapter.getFunctionReturnType(target));
  +          astAdapter.getFunctionReturnType(_targetFunction));
       }
       // TODO(het): Add source information
       // TODO(het): Set a return value instead of closing the function when we
  
positive.code:     // TODO(het): no reason to do this here...
      HInstruction.idCounter = 0;
      if (target is ir.Procedure) {
        target = (target as ir.Procedure).function;
        buildFunctionNode(target);
      } else if (target is ir.Field) {
        buildField(target);
      } else if (target is ir.Constructor) {
        buildConstructor(target);
      } else if (target is ir.FunctionExpression) {
        target = (target as ir.FunctionExpression).function;
        buildFunctionNode(target);
      } else {
        throw 'No case implemented to handle $target';
      }
  
negative.code:   }
  
    @override
    visitFunctionNode(ir.FunctionNode node) {
      LocalFunctionElement methodElement = astAdapter.getElement(node);
      ClosureClassMap nestedClosureData = compiler.closureToClassMapper
          .getClosureToClassMapping(methodElement.resolvedAst);
      assert(nestedClosureData != null);
  