@@ -351,7 +351,7 @@ void RewriteSystem::computeRedundantRequirementDiagnostics(
351
351
}
352
352
}
353
353
354
- static Optional< Requirement>
354
+ static Requirement
355
355
getRequirementForDiagnostics (Type subject, Symbol property,
356
356
const PropertyMap &map,
357
357
TypeArrayView<GenericTypeParamType> genericParams,
@@ -380,7 +380,8 @@ getRequirementForDiagnostics(Type subject, Symbol property,
380
380
property.getLayoutConstraint ());
381
381
382
382
default :
383
- return None;
383
+ llvm::errs () << " Bad property symbol: " << property << " \n " ;
384
+ abort ();
384
385
}
385
386
}
386
387
@@ -413,10 +414,10 @@ void RewriteSystem::computeConflictDiagnostics(
413
414
Type subject = propertyMap.getTypeForTerm (subjectTerm, genericParams);
414
415
MutableTerm prefix (subjectTerm.begin (), subjectTerm.end () - suffixTerm.size ());
415
416
errors.push_back (RequirementError::forConflictingRequirement (
416
- * getRequirementForDiagnostics (subject, *subjectRule.isPropertyRule (),
417
- propertyMap, genericParams, MutableTerm ()),
418
- * getRequirementForDiagnostics (subject, *suffixRule.isPropertyRule (),
419
- propertyMap, genericParams, prefix),
417
+ getRequirementForDiagnostics (subject, *subjectRule.isPropertyRule (),
418
+ propertyMap, genericParams, MutableTerm ()),
419
+ getRequirementForDiagnostics (subject, *suffixRule.isPropertyRule (),
420
+ propertyMap, genericParams, prefix),
420
421
signatureLoc));
421
422
}
422
423
}
0 commit comments