Skip to content

Commit 16c3323

Browse files
committed
Switch From Bitwise to Logical And
This seems to have been a thinko that got copied-and-pasted around this file.
1 parent 7e84355 commit 16c3323

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)