We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c48c9e commit 80eccb1Copy full SHA for 80eccb1
lib/Sema/TypeCheckPattern.cpp
@@ -1234,7 +1234,7 @@ Pattern *TypeChecker::coercePatternToType(
1234
// synchronous function in an async context. As a policy choice, don't
1235
// diagnose an inferred Void type (or optional thereof) on such bindings
1236
// as potentially unexpected.
1237
- shouldRequireType = var->isAsyncLet() ? false : true;
+ shouldRequireType = !var->isAsyncLet();
1238
} else if (auto MTT = diagTy->getAs<AnyMetatypeType>()) {
1239
if (MTT->getInstanceType()->isAnyObject())
1240
shouldRequireType = true;
0 commit comments