Skip to content

Commit 3afddfa

Browse files
committed
Check for @objc only
1 parent 813aae6 commit 3afddfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2572,7 +2572,7 @@ InterfaceTypeRequest::evaluate(Evaluator &eval, ValueDecl *D) const {
25722572
auto thrownTypeRepr = AFD->getThrownTypeRepr();
25732573
SourceLoc loc =
25742574
(thrownTypeRepr) ? thrownTypeRepr->getLoc() : AFD->getLoc();
2575-
if (AFD->getAttrs().hasAttribute<ObjCAttr>() && thrownTy) {
2575+
if (AFD->getAttrs().hasAttribute<ObjCAttr>()) {
25762576
Context.Diags.diagnose(loc, diag::typed_thrown_in_objc_forbidden);
25772577
} else if (!checkConformance(thrownTyInContext, errorProto)) {
25782578
Context.Diags.diagnose(loc, diag::thrown_type_not_error, thrownTy);

0 commit comments

Comments
 (0)