File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -2833,6 +2833,11 @@ bool FailureDiagnosis::diagnoseGeneralConversionFailure(Constraint *constraint){
2833
2833
fromType = CS.getType (sub);
2834
2834
}
2835
2835
2836
+ // Bail on constraints that don't relate two types.
2837
+ if (constraint->getKind () == ConstraintKind::Disjunction
2838
+ || constraint->getKind () == ConstraintKind::BindOverload)
2839
+ return false ;
2840
+
2836
2841
fromType = fromType->getRValueType ();
2837
2842
auto toType =
2838
2843
CS.simplifyType (constraint->getSecondType ())->getWithoutImmediateLabel ();
Original file line number Diff line number Diff line change @@ -641,7 +641,6 @@ static bool shouldContractEdge(ConstraintKind kind) {
641
641
case ConstraintKind::BindParam:
642
642
case ConstraintKind::BindToPointerType:
643
643
case ConstraintKind::Equal:
644
- case ConstraintKind::BindOverload:
645
644
646
645
// We currently only allow subtype contractions for the purpose of
647
646
// parameter binding constraints.
You can’t perform that action at this time.
0 commit comments