Skip to content

Commit 535bae1

Browse files
caldatheblixguy
andauthored
Update lib/Sema/MiscDiagnostics.cpp
Co-authored-by: Suyash Srijan <[email protected]>
1 parent f96a003 commit 535bae1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/MiscDiagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ static void diagSyntacticUseRestrictions(const Expr *E, const DeclContext *DC,
13531353
(isTypeCheckedOptionalNil(lhs) &&
13541354
(subExpr = isImplicitPromotionToOptional(rhs)))) {
13551355
bool isTrue = calleeName == "!=" || calleeName == "!==";
1356-
bool isNilLiteral = dyn_cast<NilLiteralExpr>(lhs) || dyn_cast<NilLiteralExpr>(rhs);
1356+
bool isNilLiteral = isa<NilLiteralExpr>(lhs) || isa<NilLiteralExpr>(rhs);
13571357

13581358
Ctx.Diags.diagnose(DRE->getLoc(), diag::nonoptional_compare_to_nil,
13591359
subExpr->getType(), isNilLiteral, isTrue)

0 commit comments

Comments
 (0)