anchor.diff:      );
       _writeDeclarationName(node.name);
   
  -    if (_shouldWriteResolution) {
  +    var resolutionSink = _resolutionSink;
  +    if (resolutionSink != null) {
         // TODO(scheglov) Enforce not null, remove `?` in `?.type` below.
         var element = node.declaredElement as VariableElementImpl;
         _writeMarker(MarkerTag.VariableDeclaration_type);
  -      _writeActualType(element.type);
  +      _writeActualType(resolutionSink, element.type);
         _writeMarker(MarkerTag.VariableDeclaration_inferenceError);
  -      _writeTopLevelInferenceError(element);
  +      _writeTopLevelInferenceError(resolutionSink, element);
         if (element is FieldElementImpl) {
           _writeMarker(MarkerTag.VariableDeclaration_inheritsCovariant);
  -        _resolutionSink!.writeByte(element.inheritsCovariant ? 1 : 0);
  +        resolutionSink.writeByte(element.inheritsCovariant ? 1 : 0);
         }
       }
   
  
positive.code:     _writeNodeList(node.members);
      _hasConstConstructor = false;
  
      if (_shouldWriteResolution) {
        _resolutionSink!.localElements.popScope();
      }
  
      // TODO(scheglov) write member index
  
negative.code:     }
  
      if (error != null) {
        resolutionSink.writeByte(error.kind.index);
        resolutionSink.writeStringList(error.arguments);
      } else {
        resolutionSink.writeByte(TopLevelInferenceErrorKind.none.index);
      }
    }
  
  