Switch From Bitwise to Logical And

This seems to have been a thinko that got copied-and-pasted around this file.
This commit is contained in:
Robert Widmann
2022-06-16 18:07:55 -06:00
parent 7e843559ef
commit 16c3323b4c

View File

@@ -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);
}