Skip to content

Commit 80eccb1

Browse files
jamieQhamishknight
andauthored
[refactor]: remove ternary
Co-authored-by: Hamish Knight <hamish_knight@apple.com>
1 parent 9c48c9e commit 80eccb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckPattern.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ Pattern *TypeChecker::coercePatternToType(
12341234
// synchronous function in an async context. As a policy choice, don't
12351235
// diagnose an inferred Void type (or optional thereof) on such bindings
12361236
// as potentially unexpected.
1237-
shouldRequireType = var->isAsyncLet() ? false : true;
1237+
shouldRequireType = !var->isAsyncLet();
12381238
} else if (auto MTT = diagTy->getAs<AnyMetatypeType>()) {
12391239
if (MTT->getInstanceType()->isAnyObject())
12401240
shouldRequireType = true;

0 commit comments

Comments
 (0)