Skip to content

Commit 21d3510

Browse files
authored
Merge pull request #59515 from CodaFi/illogical
Switch From Bitwise to Logical And
2 parents cfab1d8 + 16c3323 commit 21d3510

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/runtime/DynamicCast.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,7 @@ static DynamicCastResult tryCastUnwrappingExtendedExistentialSource(
17431743
srcFailureType = srcInnerType;
17441744
return tryCast(destLocation, destType, srcInnerValue, srcInnerType,
17451745
destFailureType, srcFailureType,
1746-
takeOnSuccess & (srcInnerValue == srcValue), mayDeferChecks);
1746+
takeOnSuccess && (srcInnerValue == srcValue), mayDeferChecks);
17471747
}
17481748

17491749
static DynamicCastResult
@@ -1765,7 +1765,7 @@ tryCastUnwrappingExistentialMetatypeSource(
17651765
return tryCast(destLocation, destType,
17661766
srcInnerValue, srcInnerType,
17671767
destFailureType, srcFailureType,
1768-
takeOnSuccess & (srcInnerValue == srcValue),
1768+
takeOnSuccess && (srcInnerValue == srcValue),
17691769
mayDeferChecks);
17701770
}
17711771

0 commit comments

Comments
 (0)