Skip to content

Commit c5ed8d6

Browse files
committed
[Constraint solver] Fix tautological assert.
1 parent a493004 commit c5ed8d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/CSDiagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ bool GenericArgumentsMismatchFailure::diagnoseAsError() {
641641
switch (last.getKind()) {
642642
case ConstraintLocator::ContextualType: {
643643
auto purpose = getContextualTypePurpose();
644-
assert(!(purpose == CTP_Unused && purpose == CTP_CannotFail));
644+
assert(!(purpose == CTP_Unused || purpose == CTP_CannotFail));
645645

646646
// If this is call to a closure e.g. `let _: A = { B() }()`
647647
// let's point diagnostic to its result.

0 commit comments

Comments
 (0)