anchor.diff:    }
   
     ClassTypeInfo parseClassType(Map json) {
  -    ClassTypeInfo result = parseId(json['id']);
  +    final result = parseId(json['id']) as ClassTypeInfo;
       result
         ..name = json['name']
         ..parent = parseId(json['parent'])
  -      ..outputUnit = parseId(json['outputUnit'])
  +      ..outputUnit = parseId(json['outputUnit']) as OutputUnitInfo?
         ..size = json['size'];
       return result;
     }
   
     FieldInfo parseField(Map json) {
  -    FieldInfo result = parseId(json['id']);
  +    final result = parseId(json['id']) as FieldInfo;
       return result
         ..name = json['name']
         ..parent = parseId(json['parent'])
         ..coverageId = json['coverageId']
  -      ..outputUnit = parseId(json['outputUnit'])
  +      ..outputUnit = parseId(json['outputUnit']) as OutputUnitInfo?
         ..size = json['size']
         ..type = json['type']
         ..inferredType = json['inferredType']
         ..code = parseCode(json['code'])
         ..isConst = json['const'] ?? false
  -      ..initializer = parseId(json['initializer'])
  +      ..initializer = parseId(json['initializer']) as ConstantInfo?
         ..closures = (json['children'] as List)
  -          .map<ClosureInfo>((c) => parseId(c))
  +          .map<ClosureInfo>((c) => parseId(c) as ClosureInfo)
             .toList();
     }
   
     ConstantInfo parseConstant(Map json) {
  -    ConstantInfo result = parseId(json['id']);
  +    final result = parseId(json['id']) as ConstantInfo;
       return result
         ..name = json['name']
         ..code = parseCode(json['code'])
         ..size = json['size']
  -      ..outputUnit = parseId(json['outputUnit']);
  +      ..outputUnit = parseId(json['outputUnit']) as OutputUnitInfo?;
     }
   
     TypedefInfo parseTypedef(Map json) {
  -    TypedefInfo result = parseId(json['id']);
  +    final result = parseId(json['id']) as TypedefInfo;
       return result
         ..name = json['name']
         ..parent = parseId(json['parent'])
  
positive.code:       'dump_version': isBackwardCompatible ? 5 : info.version,
        'deferredFiles': info.deferredFiles,
        'dump_minor_version': isBackwardCompatible ? 1 : info.minorVersion,
        'program': info.program.accept(this)
      };
    }
  
  
negative.code:     // TODO(sigmund): Omit this also when outputUnit.id == 0 (most code is in
      // the main output unit by default).
      if (info.outputUnit != null) {
        res['outputUnit'] = idFor(info.outputUnit!).serializedId;
      }
      if (info.coverageId != null) res['coverageId'] = info.coverageId;
      if (info.parent != null) res['parent'] = idFor(info.parent!).serializedId;
      return res;
    }
  
  