Skip to content

Commit ff75f1d

Browse files
committed
[master-next] Adjust syntax for setting an Optional member
Setting the ConditionalRequirements member of SpecializedProtocolConformance to "{}" works fine with the swift-4.2-branch of swift-llvm, but with the current upstream-with-swift branch, that results in a build failure: error: use of overloaded operator '=' is ambiguous (with operand types 'Optional<ArrayRef<swift::Requirement> >' and 'void') I suspect this is due to LLVM r322838 which made a bunch of changes to LLVM's Optional type.
1 parent 42ca684 commit ff75f1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/ProtocolConformance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ void SpecializedProtocolConformance::computeConditionalRequirements() const {
861861
auto &ctxt = getProtocol()->getASTContext();
862862
ConditionalRequirements = ctxt.AllocateCopy(newReqs);
863863
} else {
864-
ConditionalRequirements = {};
864+
ConditionalRequirements = Optional<ArrayRef<Requirement>>();
865865
}
866866
}
867867

0 commit comments

Comments
 (0)