Skip to content

[master-next] Adjust syntax for setting an Optional member #17491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bob-wilson
Copy link
Contributor

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<ArrayRefswift::Requirement >' and 'void')

I suspect this is due to LLVM r322838 which made a bunch of changes to
LLVM's Optional type.

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.
@bob-wilson bob-wilson requested a review from huonw June 25, 2018 23:50
@bob-wilson
Copy link
Contributor Author

I'm going to merge this to un-break the master-next build, but Huon, please review and make sure this is still doing what you expect.

@bob-wilson bob-wilson merged commit 2a1a092 into swiftlang:master-next Jun 25, 2018
@bob-wilson bob-wilson deleted the conditionalrequirements-fix branch June 25, 2018 23:51
@huonw
Copy link
Contributor

huonw commented Jun 26, 2018

Thanks for doing this. The original was very ambiguous, and unfortunately this isn't quite what was desired. #17499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants