bool AddInterfaceFields(InterfaceGen iface, List <Field> fields, HashSet <string> seen, CodeGenerationOptions opt, CodeGeneratorContext context) { var needs_property = false; foreach (var f in fields) { if (iface.ContainsName(f.Name)) { Report.LogCodedWarning(0, SourceWriterExtensions.GetFieldCollisionMessage(iface, f), f, iface.FullName, f.Name, iface.JavaName); continue; } if (seen.Contains(f.Name)) { Report.LogCodedWarning(0, Report.WarningDuplicateField, f, iface.FullName, f.Name, iface.JavaName); continue; } if (f.Validate(opt, iface.TypeParameters, context)) { seen.Add(f.Name); needs_property = needs_property || f.NeedsProperty; if (f.NeedsProperty) { Properties.Add(new BoundFieldAsProperty(iface, f, opt)); } else { Fields.Add(new BoundField(iface, f, opt)); } } } return(needs_property); }