anchor.diff:        Iterable<ClassMember> overriddenMembers) {
       if (fieldBuilder.classBuilder == classBuilder &&
           fieldBuilder.type == null) {
  -      for (ClassMember overriddenMember
  -          in toSet(classBuilder, overriddenMembers)) {
  +      DartType inferredType;
  +
  +      void inferFrom(ClassMember overriddenMember) {
  +        if (inferredType is InvalidType) return;
  +
           assert(useConsolidated || !overriddenMember.hasDeclarations);
           Member bTarget = overriddenMember.getMember(hierarchy);
           DartType inheritedType;
  
positive.code:         if (inheritedType == null) {
            debug
                ?.log("Giving up (inheritedType == null)\n${StackTrace.current}");
            continue;
          }
          Substitution bSubstitution;
          if (classBuilder.cls != bTarget.enclosingClass) {
  
negative.code:           debug?.log("${classBuilder.fullNameForErrors} -> "
                "${bTarget.enclosingClass.name} $bSubstitution");
          }
          assert(inheritedType is! ImplicitFieldType);
          if (bSubstitution != null) {
            inheritedType = bSubstitution.substituteType(inheritedType);
          }
          if (!classBuilder.library.isNonNullableByDefault) {
            inheritedType = legacyErasure(hierarchy.coreTypes, inheritedType);
          }
  
          if (inferredType == null) {
            inferredType = inheritedType;
          } else {
            if (classBuilder.library.isNonNullableByDefault) {
              DartType topMerge =
                  nnbdTopMerge(hierarchy.coreTypes, inferredType, inheritedType);
              if (topMerge != null) {
                inferredType = topMerge;
                return;
              }
            }
            if (inferredType != inheritedType) {
              inferredType = const InvalidType();
              // A different type has already been inferred.
              reportCantInferFieldType(classBuilder, fieldBuilder);
            }
          }
        }
  
        overriddenMembers = toSet(classBuilder, overriddenMembers);
        if (fieldBuilder.isAssignable) {
          // The field type must be inferred from both getters and setters.
          for (ClassMember overriddenMember in overriddenMembers) {
            inferFrom(overriddenMember);
          }
        } else {
          // The field type must be inferred from getters first.
          for (ClassMember overriddenMember in overriddenMembers) {
            if (!overriddenMember.forSetter) {
              inferFrom(overriddenMember);
            }
          }
          if (inferredType == null) {
            // The field type must be inferred from setters if no type was
            // inferred from getters.
            for (ClassMember overriddenMember in overriddenMembers) {
              if (overriddenMember.forSetter) {
                inferFrom(overriddenMember);
              }
            }
          }
        }
  
        inferredType ??= const DynamicType();
        fieldBuilder.fieldType = inferredType;
      }
    }
  
  