expectedReturnType).bind(dc -> validateFieldTypeUniformity(dc).map(
fields -> adt(deriveConfig, typeConstructor(adtTypeElement, declaredType, adtTypeVariables),
matchMethod(adtAcceptMethod, expectedReturnType), dc, fields)))))));
}
private DeriveResult<List<DataArgument>> validateFieldTypeUniformity(DataConstruction construction) {
<BUG>return DataConstructions.cases()
.multipleConstructors(multipleConstructors -> {</BUG>
Map<String, List<DataArgument>> fieldsMap = multipleConstructors.constructors()
.stream()
.flatMap(c -> c.arguments().stream())

expectedReturnType).bind(dc -> validateFieldTypeUniformity(dc).map(
fields -> adt(deriveConfig, typeConstructor(adtTypeElement, declaredType, adtTypeVariables),
matchMethod(adtAcceptMethod, expectedReturnType), dc, fields)))))));
}
private DeriveResult<List<DataArgument>> validateFieldTypeUniformity(DataConstruction construction) {
return caseOf(construction)
.multipleConstructors(multipleConstructors -> {
Map<String, List<DataArgument>> fieldsMap = multipleConstructors.constructors()
.stream()
.flatMap(c -> c.arguments().stream())
