Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Sema/CSDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ bool MissingConformanceFailure::diagnoseAsAmbiguousOperatorRef() {
// about missing conformance just in case.
auto operatorID = name.getIdentifier();

auto *applyExpr = cast_or_null<ApplyExpr>(findParentExpr(anchor));
auto *applyExpr = cast<ApplyExpr>(findParentExpr(anchor));
if (auto *binaryOp = dyn_cast<BinaryExpr>(applyExpr)) {
auto lhsType = getType(binaryOp->getArg()->getElement(0));
auto rhsType = getType(binaryOp->getArg()->getElement(1));
Expand Down
4 changes: 2 additions & 2 deletions lib/Sema/ConstraintSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2425,7 +2425,7 @@ bool ConstraintSystem::salvage(SmallVectorImpl<Solution> &viable, Expr *expr) {

// Before removing any "fixed" solutions, let's check
// if ambiguity is caused by fixes and diagnose if possible.
if (diagnoseAmbiguityWithFixes(expr, viable))
if (diagnoseAmbiguityWithFixes(viable))
return true;

// FIXME: If we were able to actually fix things along the way,
Expand Down Expand Up @@ -2529,7 +2529,7 @@ static void diagnoseOperatorAmbiguity(ConstraintSystem &cs,
}

bool ConstraintSystem::diagnoseAmbiguityWithFixes(
Expr *expr, ArrayRef<Solution> solutions) {
ArrayRef<Solution> solutions) {
if (solutions.empty())
return false;

Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/ConstraintSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -2108,7 +2108,7 @@ class ConstraintSystem {
void diagnoseFailureForExpr(Expr *expr);

bool diagnoseAmbiguity(Expr *expr, ArrayRef<Solution> solutions);
bool diagnoseAmbiguityWithFixes(Expr *expr, ArrayRef<Solution> solutions);
bool diagnoseAmbiguityWithFixes(ArrayRef<Solution> solutions);

/// Give the deprecation warning for referring to a global function
/// when there's a method from a conditional conformance in a smaller/closer
Expand Down