From 16c3323b4cc308b5a57e948210cf8a2dcfae269e Mon Sep 17 00:00:00 2001 From: Robert Widmann Date: Thu, 16 Jun 2022 18:07:55 -0600 Subject: [PATCH] Switch From Bitwise to Logical And This seems to have been a thinko that got copied-and-pasted around this file. --- stdlib/public/runtime/DynamicCast.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/public/runtime/DynamicCast.cpp b/stdlib/public/runtime/DynamicCast.cpp index 9feedee32ff53..2488d925bb575 100644 --- a/stdlib/public/runtime/DynamicCast.cpp +++ b/stdlib/public/runtime/DynamicCast.cpp @@ -1743,7 +1743,7 @@ static DynamicCastResult tryCastUnwrappingExtendedExistentialSource( srcFailureType = srcInnerType; return tryCast(destLocation, destType, srcInnerValue, srcInnerType, destFailureType, srcFailureType, - takeOnSuccess & (srcInnerValue == srcValue), mayDeferChecks); + takeOnSuccess && (srcInnerValue == srcValue), mayDeferChecks); } static DynamicCastResult @@ -1765,7 +1765,7 @@ tryCastUnwrappingExistentialMetatypeSource( return tryCast(destLocation, destType, srcInnerValue, srcInnerType, destFailureType, srcFailureType, - takeOnSuccess & (srcInnerValue == srcValue), + takeOnSuccess && (srcInnerValue == srcValue), mayDeferChecks); }