mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Use operator bool to claw back some readability
This commit is contained in:
@@ -2294,7 +2294,7 @@ bool ContextualFailure::diagnoseThrowsTypeMismatch() const {
|
||||
auto conformance = TypeChecker::conformsToProtocol(
|
||||
errorCodeType, errorCodeProtocol, getDC(),
|
||||
ConformanceCheckFlags::InExpression);
|
||||
if (!conformance.isInvalid()) {
|
||||
if (conformance) {
|
||||
Type errorType =
|
||||
conformance
|
||||
.getTypeWitnessByName(errorCodeType, getASTContext().Id_ErrorType)
|
||||
|
||||
Reference in New Issue
Block a user