Skip to content

Commit 3dba00f

Browse files
committed
use bool conversion for protocol conformance instead of hasValue()
1 parent 3d9573f commit 3dba00f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,11 +499,11 @@ static void checkForEmptyOptionSet(const VarDecl *VD, TypeChecker &tc) {
499499

500500
// Make sure this type conforms to OptionSet
501501
auto *optionSetProto = tc.Context.getProtocol(KnownProtocolKind::OptionSet);
502-
bool conformsToOptionSet = tc.containsProtocol(
502+
bool conformsToOptionSet = (bool)tc.containsProtocol(
503503
DC->getSelfTypeInContext(),
504504
optionSetProto,
505505
DC,
506-
/*Flags*/None).hasValue();
506+
/*Flags*/None);
507507

508508
if (!conformsToOptionSet)
509509
return;

0 commit comments

Comments
 (0)