diff --git a/lib/Sema/TypeCheckConstraints.cpp b/lib/Sema/TypeCheckConstraints.cpp index 54253e6589eff..5574e65ada1f8 100644 --- a/lib/Sema/TypeCheckConstraints.cpp +++ b/lib/Sema/TypeCheckConstraints.cpp @@ -3909,7 +3909,7 @@ CheckedCastKind TypeChecker::typeCheckCheckedCast(Type fromType, auto toConstrainedArchetype = false; if (toArchetypeType) { auto archetype = toType->castTo(); - toConstrainedArchetype = archetype && !archetype->getConformsTo().empty(); + toConstrainedArchetype = !archetype->getConformsTo().empty(); } if (fromFunctionType &&