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:
@@ -429,8 +429,7 @@ configureGenericDesignatedInitOverride(ASTContext &ctx,
|
||||
auto lookupConformanceFn =
|
||||
[&](CanType depTy, Type substTy,
|
||||
ProtocolDecl *proto) -> ProtocolConformanceRef {
|
||||
auto conf = subMap.lookupConformance(depTy, proto);
|
||||
if (!conf.isInvalid())
|
||||
if (auto conf = subMap.lookupConformance(depTy, proto))
|
||||
return conf;
|
||||
|
||||
return ProtocolConformanceRef(proto);
|
||||
|
||||
Reference in New Issue
Block a user